[Patch v2 0/2] sched/numa, mm/numa: Soft Affinity via numa_preferred_nid.

chris hyser posted 2 patches 9 months, 1 week ago
There is a newer version of this series
Documentation/scheduler/sched-preferred-node.rst | 67 ++++++++++++++++++++++++++++++++
include/linux/sched.h                            |  9 +++++
include/uapi/linux/prctl.h                       |  8 ++++
kernel/sched/fair.c                              | 64 ++++++++++++++++++++++++++++++
kernel/sys.c                                     |  5 +++
tools/include/uapi/linux/prctl.h                 |  6 +++
6 files changed, 159 insertions(+)
[Patch v2 0/2] sched/numa, mm/numa: Soft Affinity via numa_preferred_nid.
Posted by chris hyser 9 months, 1 week ago
Soft Affinity (value of hard affinity with graceful handling of overload) as a
concept has been around for years. The original implementation was rejected

https://lore.kernel.org/lkml/20190702172851.GA3436@hirez.programming.kicks-ass.net/

with an alternative, using numa_preferred_nid, suggested by Peter Zijlstra.

This is a simple implementation with most of the changes associated with a
prctl() to set/get the value. It does not modify the scheduler's behavior but
simply exploits the current NUMA balancing behavior.

The intent is to provide a mechanism whereby a knowledgble user, system admin,
or importantly, a NUMA aware application can force Auto NUMA Balancing to prefer
the "correct" node, for example pinned memory like RDMA buffers or other
scenarios where heavily accessed memory ranges are pinned and not subject to
NUMA hint faults.

[PATCH v2 1/2] sched/numa: Add ability to override task's numa_preferred_nid.
 include/linux/sched.h |  1 +
 init/init_task.c      |  1 +
 kernel/sched/core.c   |  5 ++++-
 kernel/sched/debug.c  |  1 +
 kernel/sched/fair.c   | 15 +++++++++++++--
 5 files changed, 20 insertions(+), 3 deletions(-)

[PATCH v2 2/2] sched/numa: prctl to set/override task's numa_preferred_nid
 Documentation/scheduler/sched-preferred-node.rst | 67 ++++++++++++++++++++++++++++++++
 include/linux/sched.h                            |  9 +++++
 include/uapi/linux/prctl.h                       |  8 ++++
 kernel/sched/fair.c                              | 64 ++++++++++++++++++++++++++++++
 kernel/sys.c                                     |  5 +++
 tools/include/uapi/linux/prctl.h                 |  6 +++
 6 files changed, 159 insertions(+)