Skip to content

Commit 07555ac

Browse files
Michal Hockotorvalds
authored andcommitted
memcg: get rid of swapaccount leftovers
The swapaccount kernel parameter without any values has been removed by commit a2c8990 ("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>
1 parent 4bf93b5 commit 07555ac

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎Documentation/kernel-parameters.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
29532953
improve throughput, but will also increase the
29542954
amount of memory reserved for use by the client.
29552955

2956-
swapaccount[=0|1]
2956+
swapaccount=[0|1]
29572957
[KNL] Enable accounting of swap in memory resource
29582958
controller if no parameter or 1 is given or disable
29592959
it if 0 is given (See Documentation/cgroups/memory.txt)

‎init/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ config MEMCG_SWAP_ENABLED
955955
Memory Resource Controller Swap Extension comes with its price in
956956
a bigger memory consumption. General purpose distribution kernels
957957
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
959959
parameter should have this option unselected.
960960
For those who want to have the feature enabled by default should
961961
select this option (if, for some reason, they need to disable it

‎mm/memcontrol.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6969,7 +6969,6 @@ struct cgroup_subsys mem_cgroup_subsys = {
69696969
#ifdef CONFIG_MEMCG_SWAP
69706970
static int __init enable_swap_account(char *s)
69716971
{
6972-
/* consider enabled if no parameter or 1 is given */
69736972
if (!strcmp(s, "1"))
69746973
really_do_swap_account = 1;
69756974
else if (!strcmp(s, "0"))

0 commit comments

Comments
 (0)