mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Valentin Schneider <vschneid@redhat.com>,
	Mel Gorman <mgorman@suse.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>,
	Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [RFC PATCH 0/5] sched: NUMA-aware concurrency IDs
Date: Wed, 21 Aug 2024 20:09:57 -0600	[thread overview]
Message-ID: <27495118-6152-411c-9d3c-c0176afc9492@linuxfoundation.org> (raw)
In-Reply-To: <20240819142406.339084-1-mathieu.desnoyers@efficios.com>

On 8/19/24 08:24, Mathieu Desnoyers wrote:
> The issue addressed by this series is the non-locality of NUMA accesses
> to data structures indexed by concurrency IDs: for example, in a
> scenario where a process has two threads, and they periodically run one
> after the other on different NUMA nodes, each will be assigned mm_cid=0.
> As a consequence, they will end up accessing the same pages, and thus at
> least one of the threads will need to perform remote NUMA accesses,
> which is inefficient.
> 
> Solve this by making the rseq concurrency ID (mm_cid) NUMA-aware. On
> NUMA systems, when a NUMA-aware concurrency ID is observed by user-space
> to be associated with a NUMA node, guarantee that it never changes NUMA
> node unless either a kernel-level NUMA configuration change happens, or
> scheduler migrations end up migrating tasks across NUMA nodes.
> 
> There is a tradeoff between NUMA locality and compactness of the
> concurrency ID allocation. Favor compactness over NUMA locality when
> the scheduler migrates tasks across NUMA nodes, as this does not cause
> the frequent remote NUMA accesses behavior. This is done by limiting the
> concurrency ID range to minimum between the number of threads belonging
> to the process and the number of allowed CPUs.
> 
> This series applies on top of v6.10.3.
> 
> Cc: Valentin Schneider <vschneid@redhat.com>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Ben Segall <bsegall@google.com>
> Cc: Yury Norov <yury.norov@gmail.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> 
> Mathieu Desnoyers (5):
>    lib: Implement find_{first,next,nth}_notandnot_bit,
>      find_first_andnot_bit
>    cpumask: Implement cpumask_{first,next}_{not,}andnot
>    sched: NUMA-aware per-memory-map concurrency IDs
>    selftests/rseq: x86: Implement rseq_load_u32_u32
>    selftests/rseq: Implement NUMA node id vs mm_cid invariant test
> 
>   include/linux/cpumask.h                       |  60 ++++++++
>   include/linux/find.h                          | 122 ++++++++++++++-
>   include/linux/mm_types.h                      |  57 ++++++-
>   kernel/sched/core.c                           |  10 +-
>   kernel/sched/sched.h                          | 139 +++++++++++++++--
>   lib/find_bit.c                                |  42 +++++
>   tools/testing/selftests/rseq/.gitignore       |   1 +
>   tools/testing/selftests/rseq/Makefile         |   2 +-
>   .../testing/selftests/rseq/basic_numa_test.c  | 144 ++++++++++++++++++
>   tools/testing/selftests/rseq/rseq-x86-bits.h  |  43 ++++++
>   tools/testing/selftests/rseq/rseq.h           |  14 ++
>   11 files changed, 613 insertions(+), 21 deletions(-)
>   create mode 100644 tools/testing/selftests/rseq/basic_numa_test.c
> 

Looks good to me - for selftests:

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

      parent reply	other threads:[~2024-08-22  2:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 14:24 Mathieu Desnoyers
2024-08-19 14:24 ` [RFC PATCH 1/5] lib: Implement find_{first,next,nth}_notandnot_bit, find_first_andnot_bit Mathieu Desnoyers
2024-08-19 19:19   ` Yury Norov
2024-08-20 17:19     ` Mathieu Desnoyers
2024-08-20 20:45       ` Mathieu Desnoyers
2024-08-20 21:15         ` Yury Norov
2024-08-19 14:24 ` [RFC PATCH 2/5] cpumask: Implement cpumask_{first,next}_{not,}andnot Mathieu Desnoyers
2024-08-19 19:24   ` Yury Norov
2024-08-20 17:28     ` Mathieu Desnoyers
2024-08-19 14:24 ` [RFC PATCH 3/5] sched: NUMA-aware per-memory-map concurrency IDs Mathieu Desnoyers
2024-08-19 14:24 ` [RFC PATCH 4/5] selftests/rseq: x86: Implement rseq_load_u32_u32 Mathieu Desnoyers
2024-08-19 14:24 ` [RFC PATCH 5/5] selftests/rseq: Implement NUMA node id vs mm_cid invariant test Mathieu Desnoyers
2024-08-22  2:09 ` Shuah Khan [this message]

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=27495118-6152-411c-9d3c-c0176afc9492@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yury.norov@gmail.com \
    /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

all inboxes | Powered by JetHome®