From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1DCD02C0F68; Sat, 22 Nov 2025 19:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763838819; cv=none; b=DkVL2qy3L8zFiFwZhZx2+1TmnfR2nFArvp8O+4/8cKyebIrpFJ/D5rTOGpCwAiDADmQYtFuxX254wdMpVW4Y5qOrhCAYSldaWvQsMT5ySIQovMAVFuoB7lNtIQJRg6lo6B6OP4BbzwMsPr+84ZGrbH/QXsj3v8YLXAeLjIQ8Rrw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763838819; c=relaxed/simple; bh=P+IvViypdqWTsu2iUchRRO/BOZ/npDCJSLzUqKJBHTY=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=vBNFYZa6E7KAXVddMtaFzakNSwyyPxk0MKVI97IDvp1m98vPwZ0J6XsgY2pU4Swsxcmuzv+eEjM9wATv6fCMgV4ZsxtPy7AqLBQc4j6qtwZVXPNnTY4si9+H/Z/S3BOxPjktHAY/cH/hQuzzVf7mi46Ua08nneQWGp2yzjYTPHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=czXNTPSq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="czXNTPSq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ECA5C4CEF5; Sat, 22 Nov 2025 19:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1763838818; bh=P+IvViypdqWTsu2iUchRRO/BOZ/npDCJSLzUqKJBHTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=czXNTPSqe45T71X7q+uZSl5WU7lNGQWLBNpMccvRrHs0Y/LVEHxdhDD9iqtEykBhl S9ry1g9ioR5zeZj8Kj2L8MOBEe2j9ADEXH1F7e15xF4yNSKj2LrXKXzERmc+OVHfuF ftYbqquy5hDcL/KFxtpqhnM+5seZdfENlIP0Dlao= Date: Sat, 22 Nov 2025 11:13:36 -0800 From: Andrew Morton To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, "Paul E. McKenney" , Steven Rostedt , Masami Hiramatsu , Dennis Zhou , Tejun Heo , Christoph Lameter , Martin Liu , David Rientjes , christian.koenig@amd.com, Shakeel Butt , SeongJae Park , Michal Hocko , Johannes Weiner , Sweet Tea Dorminy , Lorenzo Stoakes , "Liam R . Howlett" , Mike Rapoport , Suren Baghdasaryan , Vlastimil Babka , Christian Brauner , Wei Yang , David Hildenbrand , Miaohe Lin , Al Viro , linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, Yu Zhao , Roman Gushchin , Mateusz Guzik , Matthew Wilcox , Baolin Wang , Aboorva Devarajan Subject: Re: [PATCH v9 1/2] lib: Introduce hierarchical per-cpu counters Message-Id: <20251122111336.56b060c86ff6ba41fe76bfd4@linux-foundation.org> In-Reply-To: References: <20251120210354.1233994-1-mathieu.desnoyers@efficios.com> <20251120210354.1233994-2-mathieu.desnoyers@efficios.com> <20251121100308.65b36af9e090a78a66144c6c@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 22 Nov 2025 12:15:02 -0500 Mathieu Desnoyers wrote: > > > >> include/linux/percpu_counter_tree.h | 239 +++++++++++++++ > >> init/main.c | 2 + > >> lib/Makefile | 1 + > >> lib/percpu_counter_tree.c | 443 ++++++++++++++++++++++++++++ > >> 4 files changed, 685 insertions(+) > >> create mode 100644 include/linux/percpu_counter_tree.h > >> create mode 100644 lib/percpu_counter_tree.c > > > > An in-kernel test suite would be great. Like lib/*test*.c or > > tools/testing/. > > I'll keep a note to port the tests from my userspace librseq > percpu counters feature branch to the kernel. I did not do it > initially because I wanted to see if the overall approach was > deemed interesting for the kernel. It deems interesting to me - certainly seems useful in addressing some nasty problems. If it hasn't been massacred by reviewers, please poke me in a week or so and I'll look at giving it some exposure in mm.git's mm-new branch (which isn't included in linux-next).