From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Matthew Wilcox <willy@infradead.org>, Jens Axboe <axboe@kernel.dk>
Cc: paulmck@kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Will Deacon <will@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
John Stultz <jstultz@google.com>,
Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>,
Frederic Weisbecker <frederic@kernel.org>,
Joel Fernandes <joel@joelfernandes.org>,
Josh Triplett <josh@joshtriplett.org>,
Uladzislau Rezki <urezki@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang1211@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Waiman Long <longman@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vlastimil Babka <vbabka@suse.cz>,
maged.michael@gmail.com, Mateusz Guzik <mjguzik@gmail.com>,
Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>,
rcu@vger.kernel.org, linux-mm@kvack.org, lkmm@lists.linux.dev
Subject: Re: [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with hazard pointers
Date: Wed, 2 Oct 2024 11:36:09 -0400 [thread overview]
Message-ID: <d788c6aa-c8b9-41b8-b4fb-ac126a4f053f@efficios.com> (raw)
In-Reply-To: <Zv1n0VeM3ZSVPyyE@casper.infradead.org>
On 2024-10-02 17:33, Matthew Wilcox wrote:
> On Wed, Oct 02, 2024 at 11:26:27AM -0400, Mathieu Desnoyers wrote:
>> On 2024-10-02 16:09, Paul E. McKenney wrote:
>>> On Tue, Oct 01, 2024 at 09:02:01PM -0400, Mathieu Desnoyers wrote:
>>>> Hazard pointers appear to be a good fit for replacing refcount based lazy
>>>> active mm tracking.
>>>>
>>>> Highlight:
>>>>
>>>> will-it-scale context_switch1_threads
>>>>
>>>> nr threads (-t) speedup
>>>> 24 +3%
>>>> 48 +12%
>>>> 96 +21%
>>>> 192 +28%
>>>
>>> Impressive!!!
>>>
>>> I have to ask... Any data for smaller numbers of CPUs?
>>
>> Sure, but they are far less exciting ;-)
>
> How many CPUs in the system under test?
2 sockets, 96-core per socket:
CPU(s): 384
On-line CPU(s) list: 0-383
Vendor ID: AuthenticAMD
Model name: AMD EPYC 9654 96-Core Processor
CPU family: 25
Model: 17
Thread(s) per core: 2
Core(s) per socket: 96
Socket(s): 2
Stepping: 1
Frequency boost: enabled
CPU(s) scaling MHz: 68%
CPU max MHz: 3709.0000
CPU min MHz: 400.0000
BogoMIPS: 4800.00
Note that Jens Axboe got even more impressive speedups testing this
on his 512-hw-thread EPYC [1] (390% speedup for 192 threads). I've
noticed I had schedstats and sched debug enabled in my config, so I'll
have to re-run my tests.
Thanks,
Mathieu
[1] https://discuss.systems/@axboe@fosstodon.org/113238297041686326
>
>> nr threads (-t) speedup
>> 1 -0.2%
>> 2 +0.4%
>> 3 +0.2%
>> 6 +0.6%
>> 12 +0.8%
>> 24 +3%
>> 48 +12%
>> 96 +21%
>> 192 +28%
>> 384 +4%
>> 768 -0.6%
>>
>> Thanks,
>>
>> Mathieu
>>
>>>
>>> Thanx, Paul
>>>
>>>> I'm curious to see what the build bots have to say about this.
>>>>
>>>> This series applies on top of v6.11.1.
>>>>
>>>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>>>> Cc: Nicholas Piggin <npiggin@gmail.com>
>>>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>>> Cc: "Paul E. McKenney" <paulmck@kernel.org>
>>>> Cc: Will Deacon <will@kernel.org>
>>>> Cc: Boqun Feng <boqun.feng@gmail.com>
>>>> Cc: Alan Stern <stern@rowland.harvard.edu>
>>>> Cc: John Stultz <jstultz@google.com>
>>>> Cc: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
>>>> Cc: Boqun Feng <boqun.feng@gmail.com>
>>>> Cc: Frederic Weisbecker <frederic@kernel.org>
>>>> Cc: Joel Fernandes <joel@joelfernandes.org>
>>>> Cc: Josh Triplett <josh@joshtriplett.org>
>>>> Cc: Uladzislau Rezki <urezki@gmail.com>
>>>> Cc: Steven Rostedt <rostedt@goodmis.org>
>>>> Cc: Lai Jiangshan <jiangshanlai@gmail.com>
>>>> Cc: Zqiang <qiang.zhang1211@gmail.com>
>>>> Cc: Ingo Molnar <mingo@redhat.com>
>>>> Cc: Waiman Long <longman@redhat.com>
>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>> Cc: Vlastimil Babka <vbabka@suse.cz>
>>>> Cc: maged.michael@gmail.com
>>>> Cc: Mateusz Guzik <mjguzik@gmail.com>
>>>> Cc: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
>>>> Cc: rcu@vger.kernel.org
>>>> Cc: linux-mm@kvack.org
>>>> Cc: lkmm@lists.linux.dev
>>>>
>>>> Mathieu Desnoyers (4):
>>>> compiler.h: Introduce ptr_eq() to preserve address dependency
>>>> Documentation: RCU: Refer to ptr_eq()
>>>> hp: Implement Hazard Pointers
>>>> sched+mm: Use hazard pointers to track lazy active mm existence
>>>>
>>>> Documentation/RCU/rcu_dereference.rst | 38 ++++++-
>>>> Documentation/mm/active_mm.rst | 9 +-
>>>> arch/Kconfig | 32 ------
>>>> arch/powerpc/Kconfig | 1 -
>>>> arch/powerpc/mm/book3s64/radix_tlb.c | 23 +---
>>>> include/linux/compiler.h | 63 +++++++++++
>>>> include/linux/hp.h | 154 ++++++++++++++++++++++++++
>>>> include/linux/mm_types.h | 3 -
>>>> include/linux/sched/mm.h | 71 +++++-------
>>>> kernel/Makefile | 2 +-
>>>> kernel/exit.c | 4 +-
>>>> kernel/fork.c | 47 ++------
>>>> kernel/hp.c | 46 ++++++++
>>>> kernel/sched/sched.h | 8 +-
>>>> lib/Kconfig.debug | 10 --
>>>> 15 files changed, 346 insertions(+), 165 deletions(-)
>>>> create mode 100644 include/linux/hp.h
>>>> create mode 100644 kernel/hp.c
>>>>
>>>> --
>>>> 2.39.2
>>
>> --
>> Mathieu Desnoyers
>> EfficiOS Inc.
>> https://www.efficios.com
>>
>>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2024-10-02 15:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 1:02 Mathieu Desnoyers
2024-10-02 1:02 ` [RFC PATCH 1/4] compiler.h: Introduce ptr_eq() to preserve address dependency Mathieu Desnoyers
2024-10-03 0:08 ` Joel Fernandes
2024-10-03 14:19 ` Mathieu Desnoyers
2024-10-03 22:09 ` Joel Fernandes
2024-10-02 1:02 ` [RFC PATCH 2/4] Documentation: RCU: Refer to ptr_eq() Mathieu Desnoyers
2024-10-02 1:02 ` [RFC PATCH 3/4] hp: Implement Hazard Pointers Mathieu Desnoyers
2024-10-03 0:24 ` Boqun Feng
2024-10-03 13:30 ` Mathieu Desnoyers
2024-10-07 13:47 ` Boqun Feng
2024-10-07 14:52 ` Mathieu Desnoyers
2024-10-02 1:02 ` [RFC PATCH 4/4] sched+mm: Use hazard pointers to track lazy active mm existence Mathieu Desnoyers
2024-10-02 14:09 ` [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with hazard pointers Paul E. McKenney
2024-10-02 15:26 ` Mathieu Desnoyers
2024-10-02 15:33 ` Matthew Wilcox
2024-10-02 15:36 ` Mathieu Desnoyers [this message]
2024-10-02 15:53 ` Mathieu Desnoyers
2024-10-02 15:58 ` Jens Axboe
2024-10-02 16:02 ` Mathieu Desnoyers
2024-10-02 16:14 ` Jens Axboe
2024-10-02 17:39 ` Linus Torvalds
2024-10-05 16:15 ` Peter Zijlstra
2024-10-05 16:56 ` Linus Torvalds
2024-10-07 7:06 ` Peter Zijlstra
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=d788c6aa-c8b9-41b8-b4fb-ac126a4f053f@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=Neeraj.Upadhyay@amd.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=jonas.oberhauser@huaweicloud.com \
--cc=josh@joshtriplett.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkmm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=maged.michael@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mjguzik@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=willy@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