[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250622191622.3296825-1-chris.hyser@oracle.com>
Date: Sun, 22 Jun 2025 15:15:34 -0400
From: chris hyser <chris.hyser@...cle.com>
To: "Chris Hyser" <chris.hyser@...cle.com>,
"Peter Zijlstra" <peterz@...radead.org>,
"Dhaval Giani" <dhaval@...nis.ca>, "Jonathan Corbet" <corbet@....net>,
linux-kernel@...r.kernel.org, chyser@...oo.com
Subject: [Patch 0/2 v3] sched/numa, mm/numa: Soft Affinity via numa_preferred_nid.
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.
v2 to v3 Changes:
- removed confusing comments.
- combined a nested if into a single statement.
[PATCH v3 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 | 11 +++++++++--
5 files changed, 16 insertions(+), 3 deletions(-)
[PATCH v3 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 | 65 +++++++++++++++++++++++
kernel/sys.c | 5 ++
tools/include/uapi/linux/prctl.h | 6 +++
6 files changed, 160 insertions(+)
Powered by blists - more mailing lists