* Re: [PATCH v20 0/6] Hierarchical Percpu Counters for RSS [not found] <20260707131544.75906-1-mathieu.desnoyers@efficios.com> @ 2026-07-23 17:53 ` Mathieu Desnoyers 2026-08-05 18:37 ` Mathieu Desnoyers 0 siblings, 1 reply; 5+ messages in thread From: Mathieu Desnoyers @ 2026-07-23 17:53 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, Paul E. McKenney, Steven Rostedt, Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter, Martin Liu, David Rientjes, christian.koenig, Shakeel Butt, SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy, 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, Lorenzo Stoakes, linux-mm On 2026-07-07 09:15, Mathieu Desnoyers wrote: > Hi Andrew, > > Here is the hierarchical percpu counters series rebased on top of > v7.2-rc2. 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. Hello, Just a gentle ping for feedback whenever it's convenient. Thanks, Mathieu > > 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" <paulmck@kernel.org> > Cc: Steven Rostedt <rostedt@goodmis.org> > Cc: Masami Hiramatsu <mhiramat@kernel.org> > Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > Cc: Dennis Zhou <dennis@kernel.org> > Cc: Tejun Heo <tj@kernel.org> > Cc: Christoph Lameter <cl@linux.com> > Cc: Martin Liu <liumartin@google.com> > Cc: David Rientjes <rientjes@google.com> > Cc: christian.koenig@amd.com > Cc: Shakeel Butt <shakeel.butt@linux.dev> > Cc: SeongJae Park <sj@kernel.org> > Cc: Michal Hocko <mhocko@suse.com> > Cc: Johannes Weiner <hannes@cmpxchg.org> > Cc: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> > Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> > Cc: "Liam R . Howlett" <liam.howlett@oracle.com> > Cc: Mike Rapoport <rppt@kernel.org> > Cc: Suren Baghdasaryan <surenb@google.com> > Cc: Vlastimil Babka <vbabka@suse.cz> > Cc: Christian Brauner <brauner@kernel.org> > Cc: Wei Yang <richard.weiyang@gmail.com> > Cc: David Hildenbrand <david@redhat.com> > Cc: Miaohe Lin <linmiaohe@huawei.com> > Cc: Al Viro <viro@zeniv.linux.org.uk> > Cc: Yu Zhao <yuzhao@google.com> > Cc: Roman Gushchin <roman.gushchin@linux.dev> > Cc: Mateusz Guzik <mjguzik@gmail.com> > Cc: Matthew Wilcox <willy@infradead.org> > Cc: Baolin Wang <baolin.wang@linux.alibaba.com> > Cc: Aboorva Devarajan <aboorvad@linux.ibm.com> > Cc: David Carlier <devnexen@gmail.com> > Cc: Josh Law <objecting@objecting.org> > Cc: Andrew Morton <akpm@linux-foundation.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 > -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v20 0/6] Hierarchical Percpu Counters for RSS 2026-07-23 17:53 ` [PATCH v20 0/6] Hierarchical Percpu Counters for RSS Mathieu Desnoyers @ 2026-08-05 18:37 ` Mathieu Desnoyers 2026-08-05 18:57 ` Andrew Morton 0 siblings, 1 reply; 5+ messages in thread From: Mathieu Desnoyers @ 2026-08-05 18:37 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, Paul E. McKenney, Steven Rostedt, Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter, Martin Liu, David Rientjes, christian.koenig, Shakeel Butt, SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy, 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, Lorenzo Stoakes, linux-mm On 2026-07-23 13:53, Mathieu Desnoyers wrote: > On 2026-07-07 09:15, Mathieu Desnoyers wrote: >> Hi Andrew, >> >> Here is the hierarchical percpu counters series rebased on top of >> v7.2-rc2. 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. > > Hello, > > Just a gentle ping for feedback whenever it's convenient. Hi Andrew, Can you pick this up after the upcoming merge window ? That's of course assuming this is solving an issue which is still relevant. If there is no interest in solving this issue anymore, kindly let me know and I'll drop this series. Thanks, Mathieu > > Thanks, > > Mathieu > >> >> 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" <paulmck@kernel.org> >> Cc: Steven Rostedt <rostedt@goodmis.org> >> Cc: Masami Hiramatsu <mhiramat@kernel.org> >> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> >> Cc: Dennis Zhou <dennis@kernel.org> >> Cc: Tejun Heo <tj@kernel.org> >> Cc: Christoph Lameter <cl@linux.com> >> Cc: Martin Liu <liumartin@google.com> >> Cc: David Rientjes <rientjes@google.com> >> Cc: christian.koenig@amd.com >> Cc: Shakeel Butt <shakeel.butt@linux.dev> >> Cc: SeongJae Park <sj@kernel.org> >> Cc: Michal Hocko <mhocko@suse.com> >> Cc: Johannes Weiner <hannes@cmpxchg.org> >> Cc: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> >> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> >> Cc: "Liam R . Howlett" <liam.howlett@oracle.com> >> Cc: Mike Rapoport <rppt@kernel.org> >> Cc: Suren Baghdasaryan <surenb@google.com> >> Cc: Vlastimil Babka <vbabka@suse.cz> >> Cc: Christian Brauner <brauner@kernel.org> >> Cc: Wei Yang <richard.weiyang@gmail.com> >> Cc: David Hildenbrand <david@redhat.com> >> Cc: Miaohe Lin <linmiaohe@huawei.com> >> Cc: Al Viro <viro@zeniv.linux.org.uk> >> Cc: Yu Zhao <yuzhao@google.com> >> Cc: Roman Gushchin <roman.gushchin@linux.dev> >> Cc: Mateusz Guzik <mjguzik@gmail.com> >> Cc: Matthew Wilcox <willy@infradead.org> >> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> >> Cc: Aboorva Devarajan <aboorvad@linux.ibm.com> >> Cc: David Carlier <devnexen@gmail.com> >> Cc: Josh Law <objecting@objecting.org> >> Cc: Andrew Morton <akpm@linux-foundation.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 >> > > -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v20 0/6] Hierarchical Percpu Counters for RSS 2026-08-05 18:37 ` Mathieu Desnoyers @ 2026-08-05 18:57 ` Andrew Morton 2026-08-05 19:03 ` Mathieu Desnoyers 0 siblings, 1 reply; 5+ messages in thread From: Andrew Morton @ 2026-08-05 18:57 UTC (permalink / raw) To: Mathieu Desnoyers Cc: linux-kernel, Paul E. McKenney, Steven Rostedt, Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter, Martin Liu, David Rientjes, christian.koenig, Shakeel Butt, SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy, 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, Lorenzo Stoakes, linux-mm On Wed, 5 Aug 2026 14:37:08 -0400 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote: > On 2026-07-23 13:53, Mathieu Desnoyers wrote: > > On 2026-07-07 09:15, Mathieu Desnoyers wrote: > >> Hi Andrew, > >> > >> Here is the hierarchical percpu counters series rebased on top of > >> v7.2-rc2. 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. > > > > Hello, > > > > Just a gentle ping for feedback whenever it's convenient. > > Hi Andrew, > > Can you pick this up after the upcoming merge window ? Resending after -rc1 would be appropriate. > That's of course assuming this is solving an issue which is > still relevant. > > If there is no interest in solving this issue anymore, kindly > let me know and I'll drop this series. This was 1000-2000 patches ago so I've forgotten what the issue was! Please ensure that changelogging describes the issue in glorious detail and I'm sure it'll all come back. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v20 0/6] Hierarchical Percpu Counters for RSS 2026-08-05 18:57 ` Andrew Morton @ 2026-08-05 19:03 ` Mathieu Desnoyers 2026-08-06 6:25 ` Lorenzo Stoakes (ARM) 0 siblings, 1 reply; 5+ messages in thread From: Mathieu Desnoyers @ 2026-08-05 19:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-kernel, Paul E. McKenney, Steven Rostedt, Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter, Martin Liu, David Rientjes, christian.koenig, Shakeel Butt, SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy, 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, Lorenzo Stoakes, linux-mm On 2026-08-05 14:57, Andrew Morton wrote: > On Wed, 5 Aug 2026 14:37:08 -0400 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote: > >> On 2026-07-23 13:53, Mathieu Desnoyers wrote: >>> On 2026-07-07 09:15, Mathieu Desnoyers wrote: >>>> Hi Andrew, >>>> >>>> Here is the hierarchical percpu counters series rebased on top of >>>> v7.2-rc2. 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. >>> >>> Hello, >>> >>> Just a gentle ping for feedback whenever it's convenient. >> >> Hi Andrew, >> >> Can you pick this up after the upcoming merge window ? > > Resending after -rc1 would be appropriate. Will do, thanks! > >> That's of course assuming this is solving an issue which is >> still relevant. >> >> If there is no interest in solving this issue anymore, kindly >> let me know and I'll drop this series. > > This was 1000-2000 patches ago so I've forgotten what the issue was! > Please ensure that changelogging describes the issue in glorious > detail and I'm sure it'll all come back. Certainly. For the immediate records, the issue addressed by this series is RSS stats inaccuracy when reading /proc files on large SMP boxes. It gets increasingly worse for long-lifetime processes which jump around various cores while allocating/freeing memory over their lifetime. And once we get this in, it would be relevant to use this infrastructure to address the tail latency of memcg oom killer, which AFAIU is now a scan in the order of num_possible_cpus * nb processes. Although not so bad when the OOM killer fires due to a machine memory use ballooning out of proportions, it's rather inconvenient to cause large latencies when it's used to apply the mem cgroup limits, which is a rather more common routine scenario nowadays. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v20 0/6] Hierarchical Percpu Counters for RSS 2026-08-05 19:03 ` Mathieu Desnoyers @ 2026-08-06 6:25 ` Lorenzo Stoakes (ARM) 0 siblings, 0 replies; 5+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-08-06 6:25 UTC (permalink / raw) To: Mathieu Desnoyers Cc: Andrew Morton, linux-kernel, Paul E. McKenney, Steven Rostedt, Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter, Martin Liu, David Rientjes, christian.koenig, Shakeel Butt, SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy, 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 On Wed, Aug 05, 2026 at 03:03:39PM -0400, Mathieu Desnoyers wrote: > On 2026-08-05 14:57, Andrew Morton wrote: > > On Wed, 5 Aug 2026 14:37:08 -0400 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote: > > > > > On 2026-07-23 13:53, Mathieu Desnoyers wrote: > > > > On 2026-07-07 09:15, Mathieu Desnoyers wrote: > > > > > Hi Andrew, > > > > > > > > > > Here is the hierarchical percpu counters series rebased on top of > > > > > v7.2-rc2. 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. > > > > > > > > Hello, > > > > > > > > Just a gentle ping for feedback whenever it's convenient. > > > > > > Hi Andrew, > > > > > > Can you pick this up after the upcoming merge window ? > > > > Resending after -rc1 would be appropriate. > > Will do, thanks! > > > > > > That's of course assuming this is solving an issue which is > > > still relevant. > > > > > > If there is no interest in solving this issue anymore, kindly > > > let me know and I'll drop this series. > > > > This was 1000-2000 patches ago so I've forgotten what the issue was! > > Please ensure that changelogging describes the issue in glorious > > detail and I'm sure it'll all come back. > > Certainly. For the immediate records, the issue addressed by this series > is RSS stats inaccuracy when reading /proc files on large SMP boxes. It > gets increasingly worse for long-lifetime processes which jump around > various cores while allocating/freeing memory over their lifetime. > > And once we get this in, it would be relevant to use this infrastructure > to address the tail latency of memcg oom killer, which AFAIU is now a > scan in the order of num_possible_cpus * nb processes. Although not so > bad when the OOM killer fires due to a machine memory use ballooning out > of proportions, it's rather inconvenient to cause large latencies when > it's used to apply the mem cgroup limits, which is a rather more common > routine scenario nowadays. Perhaps Shakeel might have an interest from the memcg side here? :) Also similarly Johannes and Michal/Roman too perhaps? > > Thanks, > > Mathieu > > -- > Mathieu Desnoyers > EfficiOS Inc. > https://www.efficios.com -- Cheers, Lorenzo ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-06 6:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260707131544.75906-1-mathieu.desnoyers@efficios.com>
2026-07-23 17:53 ` [PATCH v20 0/6] Hierarchical Percpu Counters for RSS Mathieu Desnoyers
2026-08-05 18:37 ` Mathieu Desnoyers
2026-08-05 18:57 ` Andrew Morton
2026-08-05 19:03 ` Mathieu Desnoyers
2026-08-06 6:25 ` Lorenzo Stoakes (ARM)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox