From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8950748F; Wed, 2 Oct 2024 15:33:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727883228; cv=none; b=rkA1EGz+/aCYDzvBEyIIVH24+kOZ3zqCrWn8R5wWbYnViqgokTonqbx1FRlvl3QGWmFsVjmYMZgbWntDWpxxJ3xPsa4ZxYOfvQ80tbAJx1tTPTBUR4g/hB9TasSqGc7fI99Jr48aLfO5HH7M+LDDy3AS21SLeNRLkj4H9mekcPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727883228; c=relaxed/simple; bh=axaFRdTjND5DpZyu3FHdA8PUD5xedSDzyQMmaUHT1OU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e915jQr/+f7LjAxaDVbpV758YWegYGtMWBKlneRAkQkUUs8KJFOnwULdX3mZsn7oxiL0fCSjZppP33gD3HLek3XYFNVgxF0dNlreeVTcBIyWv66T6yqhbLzmib1w8koO3fUPlDP8hQqs8MBP2SbA39uDLgudvu26CfF/nMcsf7Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Hd7Mg3Xh; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Hd7Mg3Xh" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=gBpqJBDwQKrPqLyQ9Q2uURot1tAS7zm9LakDbxifVT8=; b=Hd7Mg3Xh+n99RAmp47YRGbSZqN 8/kQ90n5DAWLFLaXVQYuUTLR8Aw1aJ4Ef3Z6eyX5vd7gg6d6L9mqUpcwxFa/WjtC5UOE1A5a/LWQy w2KLP5V+BSvAfiV4WTyVKfenDfLrC50fdcVXsZZQK53R6n8UVhYOj98Ce2fkkjfoVZ8tqbVe6kKCb rSneBrX61n2StxB/9y4P12deUhMOmO7+nMQnIyVxaNZVHN7ZYwJS9E2aTtr6Gxs4/QDLUT92AkiR5 FlOOTZ4qpG47ad0E5bLXaqAfUtRdAO9iy5VaIFRK2JtZ3nWYHju9JPbdAYMBQRb1crgKrjy0GbwIr lt0GlgKg==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1sw1M9-00000005gCA-3fpE; Wed, 02 Oct 2024 15:33:37 +0000 Date: Wed, 2 Oct 2024 16:33:37 +0100 From: Matthew Wilcox To: Mathieu Desnoyers Cc: paulmck@kernel.org, Linus Torvalds , Andrew Morton , Peter Zijlstra , linux-kernel@vger.kernel.org, Nicholas Piggin , Michael Ellerman , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Will Deacon , Boqun Feng , Alan Stern , John Stultz , Neeraj Upadhyay , Frederic Weisbecker , Joel Fernandes , Josh Triplett , Uladzislau Rezki , Steven Rostedt , Lai Jiangshan , Zqiang , Ingo Molnar , Waiman Long , Mark Rutland , Thomas Gleixner , Vlastimil Babka , maged.michael@gmail.com, Mateusz Guzik , Jonas Oberhauser , 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 Message-ID: References: <20241002010205.1341915-1-mathieu.desnoyers@efficios.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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? > 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 > > > Cc: Nicholas Piggin > > > Cc: Michael Ellerman > > > Cc: Greg Kroah-Hartman > > > Cc: Sebastian Andrzej Siewior > > > Cc: "Paul E. McKenney" > > > Cc: Will Deacon > > > Cc: Boqun Feng > > > Cc: Alan Stern > > > Cc: John Stultz > > > Cc: Neeraj Upadhyay > > > Cc: Boqun Feng > > > Cc: Frederic Weisbecker > > > Cc: Joel Fernandes > > > Cc: Josh Triplett > > > Cc: Uladzislau Rezki > > > Cc: Steven Rostedt > > > Cc: Lai Jiangshan > > > Cc: Zqiang > > > Cc: Ingo Molnar > > > Cc: Waiman Long > > > Cc: Mark Rutland > > > Cc: Thomas Gleixner > > > Cc: Vlastimil Babka > > > Cc: maged.michael@gmail.com > > > Cc: Mateusz Guzik > > > Cc: Jonas Oberhauser > > > 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 > >