page_counter: reduce struct page_counter size
authorShakeel Butt <shakeel.butt@linux.dev>
Fri, 28 Feb 2025 07:58:08 +0000 (23:58 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 07:05:36 +0000 (00:05 -0700)
commitf7b0797d36e75d2a622580b56b9bfd3130d5d0e9
treed84b42afca8c642b84f9500ac7d19193cf1f1dae
parent0e2759afcaf9bff25a63201856fa89b64181749f
page_counter: reduce struct page_counter size

The struct page_counter has explicit padding for better cache alignment.
The commit c6f53ed8f213a ("mm, memcg: cg2 memory{.swap,}.peak write
handlers") added a field to the struct page_counter and accidently
increased its size.  Let's move the failcnt field which is v1-only field
to the same cacheline of usage to reduce the size of struct page_counter.

Link: https://lkml.kernel.org/r/20250228075808.207484-4-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin (Cruise) <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/page_counter.h