On Fri, Feb 27, 2026 at 08:25:46AM -0500, Mathieu Desnoyers wrote:
> On 2026-02-27 08:11, Heiko Carstens wrote:
> > 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.

Reply via email to