Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memcg: get rid of swapaccount leftovers

The swapaccount kernel parameter without any values has been removed by
commit a2c8990aed5a ("memsw: remove noswapaccount kernel parameter") but
it seems that we didn't get rid of all the left overs.

Make sure that menuconfig help text and kernel-parameters.txt are clear
about value for the paramter and remove the stalled comment which is not
very much useful on its own.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reported-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Michal Hocko and committed by
Linus Torvalds
07555ac1 4bf93b50

+2 -3
+1 -1
Documentation/kernel-parameters.txt
··· 2953 2953 improve throughput, but will also increase the 2954 2954 amount of memory reserved for use by the client. 2955 2955 2956 - swapaccount[=0|1] 2956 + swapaccount=[0|1] 2957 2957 [KNL] Enable accounting of swap in memory resource 2958 2958 controller if no parameter or 1 is given or disable 2959 2959 it if 0 is given (See Documentation/cgroups/memory.txt)
+1 -1
init/Kconfig
··· 955 955 Memory Resource Controller Swap Extension comes with its price in 956 956 a bigger memory consumption. General purpose distribution kernels 957 957 which want to enable the feature but keep it disabled by default 958 - and let the user enable it by swapaccount boot command line 958 + and let the user enable it by swapaccount=1 boot command line 959 959 parameter should have this option unselected. 960 960 For those who want to have the feature enabled by default should 961 961 select this option (if, for some reason, they need to disable it
-1
mm/memcontrol.c
··· 6969 6969 #ifdef CONFIG_MEMCG_SWAP 6970 6970 static int __init enable_swap_account(char *s) 6971 6971 { 6972 - /* consider enabled if no parameter or 1 is given */ 6973 6972 if (!strcmp(s, "1")) 6974 6973 really_do_swap_account = 1; 6975 6974 else if (!strcmp(s, "0"))