]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - mm/memcontrol.c
memcg: dynamically allocate lruvec_stats
authorShakeel Butt <shakeel.butt@linux.dev>
Wed, 1 May 2024 17:26:11 +0000 (10:26 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 7 May 2024 17:36:59 +0000 (10:36 -0700)
commit70a64b7919cbd6c12306051ff2825839a9d65605
treeb37b03469fcfdefb21eea51083690ffbd370ac25
parent59142d87ab03b8ff969074348f65730d465f42ee
memcg: dynamically allocate lruvec_stats

To decouple the dependency of lruvec_stats on NR_VM_NODE_STAT_ITEMS, we
need to dynamically allocate lruvec_stats in the mem_cgroup_per_node
structure.  Also move the definition of lruvec_stats_percpu and
lruvec_stats and related functions to the memcontrol.c to facilitate later
patches.  No functional changes in the patch.

Link: https://lkml.kernel.org/r/20240501172617.678560-3-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: T.J. Mercier <tjmercier@google.com>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c