]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Tue, 4 Mar 2025 05:50:51 +0000 (21:50 -0800)
commitd1902fc41a7d2ea3b97ff203f02e93d16b3baa18
tree4e583e5bc8f2cbf57e16eaa02cb3bfb286c63b37
parent358dc8442707767f002da5cea96badd1c6f130c6
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