[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a627fc7-cc62-40e6-ad28-c730d4a8f7d6@efficios.com>
Date: Wed, 2 Oct 2024 11:53:41 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Matthew Wilcox <willy@...radead.org>, Jens Axboe <axboe@...nel.dk>
Cc: paulmck@...nel.org, Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
Nicholas Piggin <npiggin@...il.com>, Michael Ellerman <mpe@...erman.id.au>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Will Deacon <will@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Alan Stern <stern@...land.harvard.edu>, John Stultz <jstultz@...gle.com>,
Neeraj Upadhyay <Neeraj.Upadhyay@....com>,
Frederic Weisbecker <frederic@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Josh Triplett <josh@...htriplett.org>, Uladzislau Rezki <urezki@...il.com>,
Steven Rostedt <rostedt@...dmis.org>, Lai Jiangshan
<jiangshanlai@...il.com>, Zqiang <qiang.zhang1211@...il.com>,
Ingo Molnar <mingo@...hat.com>, Waiman Long <longman@...hat.com>,
Mark Rutland <mark.rutland@....com>, Thomas Gleixner <tglx@...utronix.de>,
Vlastimil Babka <vbabka@...e.cz>, maged.michael@...il.com,
Mateusz Guzik <mjguzik@...il.com>,
Jonas Oberhauser <jonas.oberhauser@...weicloud.com>, rcu@...r.kernel.org,
linux-mm@...ck.org, lkmm@...ts.linux.dev
Subject: Re: [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with
hazard pointers
On 2024-10-02 17:36, Mathieu Desnoyers wrote:
> 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.
A quick re-run of the 128-thread case with schedstats and sched debug
disabled still show around 26% speedup, similar to my prior numbers.
I'm not sure why Jens has much better speedups on a similar system.
I'm attaching my config in case someone spots anything obvious. Note
that my BIOS is configured to show 24 NUMA nodes to the kernel (one
NUMA node per core complex).
Thanks,
Mathieu
>
> 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@...icios.com>
>>>>> Cc: Nicholas Piggin <npiggin@...il.com>
>>>>> Cc: Michael Ellerman <mpe@...erman.id.au>
>>>>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>>>>> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>>>>> Cc: "Paul E. McKenney" <paulmck@...nel.org>
>>>>> Cc: Will Deacon <will@...nel.org>
>>>>> Cc: Boqun Feng <boqun.feng@...il.com>
>>>>> Cc: Alan Stern <stern@...land.harvard.edu>
>>>>> Cc: John Stultz <jstultz@...gle.com>
>>>>> Cc: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
>>>>> Cc: Boqun Feng <boqun.feng@...il.com>
>>>>> Cc: Frederic Weisbecker <frederic@...nel.org>
>>>>> Cc: Joel Fernandes <joel@...lfernandes.org>
>>>>> Cc: Josh Triplett <josh@...htriplett.org>
>>>>> Cc: Uladzislau Rezki <urezki@...il.com>
>>>>> Cc: Steven Rostedt <rostedt@...dmis.org>
>>>>> Cc: Lai Jiangshan <jiangshanlai@...il.com>
>>>>> Cc: Zqiang <qiang.zhang1211@...il.com>
>>>>> Cc: Ingo Molnar <mingo@...hat.com>
>>>>> Cc: Waiman Long <longman@...hat.com>
>>>>> Cc: Mark Rutland <mark.rutland@....com>
>>>>> Cc: Thomas Gleixner <tglx@...utronix.de>
>>>>> Cc: Vlastimil Babka <vbabka@...e.cz>
>>>>> Cc: maged.michael@...il.com
>>>>> Cc: Mateusz Guzik <mjguzik@...il.com>
>>>>> Cc: Jonas Oberhauser <jonas.oberhauser@...weicloud.com>
>>>>> Cc: rcu@...r.kernel.org
>>>>> Cc: linux-mm@...ck.org
>>>>> Cc: lkmm@...ts.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
View attachment "config-hp-lazy-mm" of type "text/plain" (277483 bytes)
Powered by blists - more mailing lists