[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251031144232.15284-1-mathieu.desnoyers@efficios.com>
Date: Fri, 31 Oct 2025 10:42:30 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Mateusz Guzik <mjguzik@...il.com>,
Vlastimil Babka <vbabka@...e.cz>,
Sweet Tea Dorminy <sweettea@...gle.com>
Cc: linux-kernel@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Dennis Zhou <dennis@...nel.org>,
Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Martin Liu <liumartin@...gle.com>,
David Rientjes <rientjes@...gle.com>,
christian.koenig@....com,
Shakeel Butt <shakeel.butt@...ux.dev>,
SeongJae Park <sj@...nel.org>,
Michal Hocko <mhocko@...e.com>,
Johannes Weiner <hannes@...xchg.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
"Liam R . Howlett" <liam.howlett@...cle.com>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Christian Brauner <brauner@...nel.org>,
Wei Yang <richard.weiyang@...il.com>,
David Hildenbrand <david@...hat.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Al Viro <viro@...iv.linux.org.uk>,
linux-mm@...ck.org,
linux-trace-kernel@...r.kernel.org,
Yu Zhao <yuzhao@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Matthew Wilcox <willy@...radead.org>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Aboorva Devarajan <aboorvad@...ux.ibm.com>
Subject: [RFC PATCH v7 0/2] mm: Fix OOM killer inaccuracy on large many-core systems
Introduce hierarchical per-cpu counters and use them for rss tracking to
fix the per-mm RSS tracking which has become too inaccurate for OOM
killer purposes on large many-core systems.
The approach proposed here is to replace this by the hierarchical
per-cpu counters, which bounds the inaccuracy based on the system
topology with O(N*logN).
Relevant delta since v6: Rebase to v6.18-rc3 and implement
get_mm_counter_sum() as percpu_counter_tree_precise_sum().
Testing and feedback are welcome!
Thanks,
Mathieu
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Dennis Zhou <dennis@...nel.org>
Cc: Tejun Heo <tj@...nel.org>
Cc: Christoph Lameter <cl@...ux.com>
Cc: Martin Liu <liumartin@...gle.com>
Cc: David Rientjes <rientjes@...gle.com>
Cc: christian.koenig@....com
Cc: Shakeel Butt <shakeel.butt@...ux.dev>
Cc: SeongJae Park <sj@...nel.org>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: Sweet Tea Dorminy <sweettea@...gle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: "Liam R . Howlett" <liam.howlett@...cle.com>
Cc: Mike Rapoport <rppt@...nel.org>
Cc: Suren Baghdasaryan <surenb@...gle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Wei Yang <richard.weiyang@...il.com>
Cc: David Hildenbrand <david@...hat.com>
Cc: Miaohe Lin <linmiaohe@...wei.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: linux-mm@...ck.org
Cc: linux-trace-kernel@...r.kernel.org
Cc: Yu Zhao <yuzhao@...gle.com>
Cc: Roman Gushchin <roman.gushchin@...ux.dev>
Cc: Mateusz Guzik <mjguzik@...il.com>
Cc: Matthew Wilcox <willy@...radead.org>
Cc: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: Aboorva Devarajan <aboorvad@...ux.ibm.com>
Mathieu Desnoyers (2):
lib: Introduce hierarchical per-cpu counters
mm: Fix OOM killer inaccuracy on large many-core systems
include/linux/mm.h | 10 +-
include/linux/mm_types.h | 4 +-
include/linux/percpu_counter_tree.h | 203 ++++++++++++++
include/trace/events/kmem.h | 2 +-
kernel/fork.c | 32 ++-
lib/Makefile | 1 +
lib/percpu_counter_tree.c | 394 ++++++++++++++++++++++++++++
7 files changed, 627 insertions(+), 19 deletions(-)
create mode 100644 include/linux/percpu_counter_tree.h
create mode 100644 lib/percpu_counter_tree.c
--
2.39.5
Powered by blists - more mailing lists