Thread (14 messages) flat view 14 messages, 4 authors, 2026-02-27

Re: [PATCH v17 0/3] Improve proc RSS accuracy

From: Heiko Carstens <hca@linux.ibm.com>
Date: 2026-02-27 15:14:38
Also in: linux-mm, linux-s390, lkml

On Fri, Feb 27, 2026 at 08:25:46AM -0500, Mathieu Desnoyers wrote:
On 2026-02-27 08:11, Heiko Carstens wrote:
quoted
This seems to happen because the return value of get_rss_stat_items_size() is
larger than PERCPU_COUNTER_TREE_ITEMS_STATIC_SIZE:

PERCPU_COUNTER_TREE_ITEMS_STATIC_SIZE: 18688
get_rss_stat_items_size(): 21504
...
Which fails to account for NR_MM_COUNTERS. Does the following fix your issue ?

#define MM_STRUCT_FLEXIBLE_ARRAY_INIT                                                                   \
{                                                                                                       \
        [0 ... (PERCPU_COUNTER_TREE_ITEMS_STATIC_SIZE * NR_MM_COUNTERS) + sizeof(cpumask_t) + MM_CID_STATIC_SIZE - 1] = 0  \
}
Yes, this works.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help