From: chris hyser <chris.hyser@oracle.com>
To: "Chris Hyser" <chris.hyser@oracle.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Mel Gorman" <mgorman@suse.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Jonathan Corbet" <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [Patch v2 0/2] sched/numa, mm/numa: Soft Affinity via numa_preferred_nid.
Date: Fri, 2 May 2025 14:59:40 -0400 [thread overview]
Message-ID: <20250502190059.4121320-1-chris.hyser@oracle.com> (raw)
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(+)
next reply other threads:[~2025-05-02 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 18:59 chris hyser [this message]
2025-05-02 18:59 ` [PATCH v2 1/2] sched/numa: Add ability to override task's numa_preferred_nid chris hyser
2025-05-02 18:59 ` [PATCH v2 2/2] sched/numa: prctl to set/override " chris hyser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502190059.4121320-1-chris.hyser@oracle.com \
--to=chris.hyser@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox