memcg: move v1 events and statistics code to v1 file
authorShakeel Butt <shakeel.butt@linux.dev>
Thu, 15 Aug 2024 05:04:50 +0000 (22:04 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:26:19 +0000 (20:26 -0700)
commitf7d49ba03ae7555e6337b9d39eb080b4a064eab8
treed9522e0ddfe8b94961b964e1edb489f44fb648d7
parent7d7602b4bed9b4e70c3c0650791b6b4531733a42
memcg: move v1 events and statistics code to v1 file

Currently the common code path for charge commit, swapout and batched
uncharge are executing v1 only code which is completely useless for the v2
deployments where CONFIG_MEMCG_V1 is disabled.  In addition, it is mucking
with IRQs which might be slow on some architectures.  Let's move all of
this code to v1 only code and remove them from v2 only deployments.

Link: https://lkml.kernel.org/r/20240815050453.1298138-5-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>
mm/memcontrol-v1.c
mm/memcontrol-v1.h
mm/memcontrol.c