]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: memcontrol: move memsw charge callbacks to v1
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 24 Jan 2025 05:41:32 +0000 (00:41 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 00:59:36 +0000 (16:59 -0800)
commit1a8c2a78bca85b59ba8635408f37c7552261dbc9
tree137f48f6a8225c44d01524b09922b249e2c3c9fa
parent90f47cb98e4e2747bae58b863a0618fedf70556b
mm: memcontrol: move memsw charge callbacks to v1

The interweaving of two entirely different swap accounting strategies has
been one of the more confusing parts of the memcg code.  Split out the v1
code to clarify the implementation and a handful of callsites, and to
avoid building the v1 bits when !CONFIG_MEMCG_V1.

   text   data    bss    dec    hex filename
  39253   6446   4160  49859   c2c3 mm/memcontrol.o.old
  38877   6382   4160  49419   c10b mm/memcontrol.o

Link: https://lkml.kernel.org/r/20250124054132.45643-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Balbir Singh <balbirs@nvidia.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
include/linux/swap.h
mm/huge_memory.c
mm/memcontrol-v1.c
mm/memcontrol-v1.h
mm/memcontrol.c
mm/memory.c
mm/shmem.c
mm/swap_state.c
mm/vmscan.c