From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (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 6D1EC1D094D; Wed, 2 Oct 2024 15:28:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727882913; cv=none; b=uJfWB7QR2fua1q/ZZbRwmZJU1A/To0l7YlOZTg0XBbxBuZTT5/Tj5KDDHxCQjGZau4NNir2T/+K1lhiORn5LfCyC33XliJzBuHF1BMPLAq7KA8UtcS+RZD22L4aJrQalNgiqO+ejKUsvL4oNwyOmapRQyHgXtpR5GFpPSfp2RBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727882913; c=relaxed/simple; bh=m6x6cBfk9F17zG/g86DW4bf8U8vx2DG18BjVP9nwpJI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SqzilN23FEpTHi0xSH9viUML47/S6YkMwDNyHFuIrilyN/5YMmHf+Mo9uOVAh6BcNmkFVil/o6cqk3j3ODJ1skbOPbcb3KSpsHzUHhpGZPn+2a1mdG/y4C7k3AfOBLtJhp0pivolKzzWOmoaLntRKcLMyty26c5mTyl3WgS0ENo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=mApOV1gP; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="mApOV1gP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1727882909; bh=m6x6cBfk9F17zG/g86DW4bf8U8vx2DG18BjVP9nwpJI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mApOV1gPdSUXOkzxliDA+7pVLwWwrr6hHdRzQVoXiK/Reqdn4IoYuAV1Tc3SDUlbL VIKh9rdKWepMeaE3O+94gDMX5xcWni0+ijd91beIKBDblop2j0z5nWRdgSNdob6+jq yQ7xUsA0MFH61TkSNvc8jxrRZYZDxkAcesyvg6I3/1RerbTgihPN8K4+yXZ7pRFESH vAuuppj4SGTQXhcWWUmarQ5Z6JZafgpWHCnTPyJgjjrNScvQ6CphyZkflkJzsdyI2L GUbp6ouhjE3+6LK9kv39isVgh1CbxOh+Uuzm7h4WlXHNhRxcSnQuLlF634//J9bRGP wUeYNBEIT6OKg== Received: from [IPV6:2606:6d00:100:4000:cacb:9855:de1f:ded2] (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XJdxT09ctzqq6; Wed, 2 Oct 2024 11:28:29 -0400 (EDT) Message-ID: Date: Wed, 2 Oct 2024 11:26:27 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with hazard pointers To: paulmck@kernel.org Cc: 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 References: <20241002010205.1341915-1-mathieu.desnoyers@efficios.com> From: Mathieu Desnoyers Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 ;-) 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