From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout.efficios.com (smtpout.efficios.com [158.69.130.18]) (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 3AFED49505D for ; Tue, 1 Sep 2026 18:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=158.69.130.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788287360; cv=none; b=e4dQlmnoAApev0uKlWcmWfwE/UtXGMWJYI0bsPl0R/pcT2FLQlMVgFQwGvmnJtGXJfrSTQ56C4HQhLtb0A2dPkyjfqmYQsVOstxUX8mKZjPRDxVebYC0U/h6AmDP++JAmsZfU3XpqMD34rBd+ymm3SJSaoJKfpi7KeHUrPNz1t4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788287360; c=relaxed/simple; bh=BLYdv1aKZgwy8HwkhERdN1xQJIw1l3+i5Tc85W4CScM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ahlv7TmigBtrL0eTu5F3f+4hP2Sixl9NyuWm//Yy/KYFrjh6sxwk3gqfdDQG1n9LeXWfa5ug4A81jhTMeMVhSBciH/lthOEflvD1K1QQyCKNl1KMeGWzCqcoOL3Aw4A1yrc5tsm9pqNkVe8N6RucGYk9lT7y868JSrgfPf33sro= 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=QajWR+kJ; arc=none smtp.client-ip=158.69.130.18 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="QajWR+kJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1788287350; bh=FOcNzTawBpX5g45f7ywapH98j8rGtWxKx3lq/TqFmkY=; h=From:To:Cc:Subject:Date:From; b=QajWR+kJdHwkjna4g3bEa6+p6wAOZ4Ed8kxzCLylLQOnUsbr/HSrzL2jEK8qcHmvu jag9LUbVt5w+5foekmrQRUJ6kfOcAOQ6FIYStpSQDAv/mg6B5XYj48vKpRVIC0qZmT Ba//F3JqNoQlsKvj64FvObhl6E5a5gvmTAYZETRqY5RvYFhqURhvWXbCSQ0yCw5t7I b+C1GqKGOfYp9JpGwrGAMYw6e9OzSYDEm63yH9u5ofB71csJyO48xdW/eAdYEgLKvM z4BLi+LydGEiueTObZrIU9yOsAJW9WlimU6BbOPHTxI0r8phOdnZCpx5xcpyPIKxSk rp61voO3nkqdw== Received: from compudjdev.. (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4hZDsL0JtGzWHJ; Tue, 01 Sep 2026 14:29:10 -0400 (EDT) From: Mathieu Desnoyers To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , "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 , Yu Zhao , Roman Gushchin , Mateusz Guzik , Matthew Wilcox , Baolin Wang , Aboorva Devarajan , David Carlier , Josh Law , linux-mm@kvack.org Subject: [PATCH v21 0/6] Hierarchical Percpu Counters for RSS Date: Tue, 1 Sep 2026 14:28:45 -0400 Message-ID: <20260901182857.26690-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Andrew, Here is the hierarchical percpu counters for RSS accounting series rebased on top of v7.3-rc1. It includes small bootup fixes which were needed to fix bootup sequence on specific architectures, and a rename of the test config option to include "KUNIT_". This aims at replacing the prior version of the series you had in mm. As a reminder, the goal here is to provide more precise RSS counters through /proc. A future step would be to also use these counters to speed up the OOM killer task selection when OOM is triggered by memcg. In whole-machine OOM situations, latency introduced by the OOM killer task selection may not be too much of an issue, but for memcg, where cgroups may routinely depend on the OOM killer, the acceptable latency tradeoff is quite different. Thanks, Mathieu Mathieu Desnoyers (6): lib: introduce hierarchical per-cpu counters lib: test hierarchical per-cpu counters mm: improve RSS counter approximation accuracy for proc interfaces mm: reorder mm_struct flexible array to place mm_cpumask first init: move percpu_counter_tree_subsystem_init() earlier in boot lib: inline percpu_counter_tree_items_size with boot-safety sentinel Cc: "Paul E. McKenney" Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Martin Liu Cc: David Rientjes Cc: christian.koenig@amd.com Cc: Shakeel Butt Cc: SeongJae Park Cc: Michal Hocko Cc: Johannes Weiner Cc: Sweet Tea Dorminy Cc: Lorenzo Stoakes Cc: Liam R. Howlett Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Christian Brauner Cc: Wei Yang Cc: David Hildenbrand Cc: Miaohe Lin Cc: Al Viro Cc: Yu Zhao Cc: Roman Gushchin Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Baolin Wang Cc: Aboorva Devarajan Cc: David Carlier Cc: Josh Law Cc: Andrew Morton Cc: linux-mm@kvack.org .../core-api/percpu-counter-tree.rst | 75 ++ include/linux/mm.h | 20 +- include/linux/mm_types.h | 65 +- include/linux/percpu_counter_tree.h | 387 ++++++++++ include/trace/events/kmem.h | 2 +- init/main.c | 2 + kernel/fork.c | 24 +- lib/Kconfig | 12 + lib/Makefile | 1 + lib/percpu_counter_tree.c | 694 ++++++++++++++++++ lib/tests/Makefile | 2 + lib/tests/percpu_counter_tree_kunit.c | 399 ++++++++++ 12 files changed, 1651 insertions(+), 32 deletions(-) create mode 100644 Documentation/core-api/percpu-counter-tree.rst create mode 100644 include/linux/percpu_counter_tree.h create mode 100644 lib/percpu_counter_tree.c create mode 100644 lib/tests/percpu_counter_tree_kunit.c -- 2.43.0