memcg: allocate v1 event percpu only on v1 deployment
authorShakeel Butt <shakeel.butt@linux.dev>
Thu, 15 Aug 2024 05:04:52 +0000 (22:04 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:26:20 +0000 (20:26 -0700)
commit0ccaf421d6592bb99bb9b424e4ccca3c6367d799
tree8fa852efe724f76a25688faff1824c4400a567c5
parenta5ebe6bbe52de8d96e628c5696bb9e6dff136ca0
memcg: allocate v1 event percpu only on v1 deployment

Currently memcg->events_percpu gets allocated on v2 deployments.  Let's
move the allocation to v1 only codebase.  This is not needed in v2.

Link: https://lkml.kernel.org/r/20240815050453.1298138-7-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 <roman.gushchin@linux.dev>
Cc: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol-v1.c
mm/memcontrol-v1.h