Skip to content

Commit e55b9f9

Browse files
hnazakpm00
authored andcommitted
mm: memcontrol: drop dead CONFIG_MEMCG_SWAP config symbol
Since 2d1c498 ("mm: memcontrol: make swap tracking an integral part of memory control"), CONFIG_MEMCG_SWAP hasn't been a user-visible config option anymore, it just means CONFIG_MEMCG && CONFIG_SWAP. Update the sites accordingly and drop the symbol. [ While touching the docs, remove two references to CONFIG_MEMCG_KMEM, which hasn't been a user-visible symbol for over half a decade. ] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Shakeel Butt <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Roman Gushchin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent b94c4e9 commit e55b9f9

13 files changed

Lines changed: 10 additions & 22 deletions

File tree

Documentation/admin-guide/cgroup-v1/memory.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Per-node-per-memcgroup LRU (cgroup's private LRU) is guarded by
299299
lruvec->lru_lock; PG_lru bit of page->flags is cleared before
300300
isolating a page from its LRU under lruvec->lru_lock.
301301

302-
2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
302+
2.7 Kernel Memory Extension
303303
-----------------------------------------------
304304

305305
With the Kernel memory extension, the Memory Controller is able to limit
@@ -386,8 +386,6 @@ U != 0, K >= U:
386386

387387
a. Enable CONFIG_CGROUPS
388388
b. Enable CONFIG_MEMCG
389-
c. Enable CONFIG_MEMCG_SWAP (to use swap extension)
390-
d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)
391389

392390
3.1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
393391
-------------------------------------------------------------------

arch/mips/configs/db1xxx_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ CONFIG_HIGH_RES_TIMERS=y
99
CONFIG_LOG_BUF_SHIFT=16
1010
CONFIG_CGROUPS=y
1111
CONFIG_MEMCG=y
12-
CONFIG_MEMCG_SWAP=y
1312
CONFIG_BLK_CGROUP=y
1413
CONFIG_CGROUP_SCHED=y
1514
CONFIG_CFS_BANDWIDTH=y

arch/mips/configs/generic_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ CONFIG_NO_HZ_IDLE=y
33
CONFIG_IKCONFIG=y
44
CONFIG_IKCONFIG_PROC=y
55
CONFIG_MEMCG=y
6-
CONFIG_MEMCG_SWAP=y
76
CONFIG_BLK_CGROUP=y
87
CONFIG_CFS_BANDWIDTH=y
98
CONFIG_RT_GROUP_SCHED=y

arch/powerpc/configs/powernv_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=13
1717
CONFIG_NUMA_BALANCING=y
1818
CONFIG_CGROUPS=y
1919
CONFIG_MEMCG=y
20-
CONFIG_MEMCG_SWAP=y
2120
CONFIG_CGROUP_SCHED=y
2221
CONFIG_CGROUP_FREEZER=y
2322
CONFIG_CPUSETS=y

arch/powerpc/configs/pseries_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=13
1616
CONFIG_NUMA_BALANCING=y
1717
CONFIG_CGROUPS=y
1818
CONFIG_MEMCG=y
19-
CONFIG_MEMCG_SWAP=y
2019
CONFIG_CGROUP_SCHED=y
2120
CONFIG_CGROUP_FREEZER=y
2221
CONFIG_CPUSETS=y

arch/sh/configs/sdk7786_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONFIG_CPUSETS=y
1616
# CONFIG_PROC_PID_CPUSET is not set
1717
CONFIG_CGROUP_CPUACCT=y
1818
CONFIG_CGROUP_MEMCG=y
19-
CONFIG_CGROUP_MEMCG_SWAP=y
2019
CONFIG_CGROUP_SCHED=y
2120
CONFIG_RT_GROUP_SCHED=y
2221
CONFIG_BLK_CGROUP=y

arch/sh/configs/urquell_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y
1414
# CONFIG_PROC_PID_CPUSET is not set
1515
CONFIG_CGROUP_CPUACCT=y
1616
CONFIG_CGROUP_MEMCG=y
17-
CONFIG_CGROUP_MEMCG_SWAP=y
1817
CONFIG_CGROUP_SCHED=y
1918
CONFIG_RT_GROUP_SCHED=y
2019
CONFIG_BLK_DEV_INITRD=y

include/linux/swap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ static inline void folio_throttle_swaprate(struct folio *folio, gfp_t gfp)
666666
cgroup_throttle_swaprate(&folio->page, gfp);
667667
}
668668

669-
#ifdef CONFIG_MEMCG_SWAP
669+
#if defined(CONFIG_MEMCG) && defined(CONFIG_SWAP)
670670
void mem_cgroup_swapout(struct folio *folio, swp_entry_t entry);
671671
int __mem_cgroup_try_charge_swap(struct folio *folio, swp_entry_t entry);
672672
static inline int mem_cgroup_try_charge_swap(struct folio *folio,

include/linux/swap_cgroup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <linux/swap.h>
66

7-
#ifdef CONFIG_MEMCG_SWAP
7+
#if defined(CONFIG_MEMCG) && defined(CONFIG_SWAP)
88

99
extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
1010
unsigned short old, unsigned short new);
@@ -40,6 +40,6 @@ static inline void swap_cgroup_swapoff(int type)
4040
return;
4141
}
4242

43-
#endif /* CONFIG_MEMCG_SWAP */
43+
#endif
4444

4545
#endif /* __LINUX_SWAP_CGROUP_H */

init/Kconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -958,11 +958,6 @@ config MEMCG
958958
help
959959
Provides control over the memory footprint of tasks in a cgroup.
960960

961-
config MEMCG_SWAP
962-
bool
963-
depends on MEMCG && SWAP
964-
default y
965-
966961
config MEMCG_KMEM
967962
bool
968963
depends on MEMCG && !SLOB

0 commit comments

Comments
 (0)