Skip to content

Commit 552b372

Browse files
Michal Hockotorvalds
authored andcommitted
memsw: deprecate noswapaccount kernel parameter and schedule it for removal
noswapaccount couldn't be used to control memsw for both on/off cases so we have added swapaccount[=0|1] parameter. This way we can turn the feature in two ways noswapaccount resp. swapaccount=0. We have kept the original noswapaccount but I think we should remove it after some time as it just makes more command line parameters without any advantages and also the code to handle parameters is uglier if we want both parameters. Signed-off-by: Michal Hocko <mhocko@suse.cz> Requested-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fceda1b commit 552b372

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎Documentation/feature-removal-schedule.txt‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,3 +603,19 @@ Why: The adm9240, w83792d and w83793 hardware monitoring drivers have
603603
Who: Jean Delvare <khali@linux-fr.org>
604604

605605
----------------------------
606+
607+
What: noswapaccount kernel command line parameter
608+
When: 2.6.40
609+
Why: The original implementation of memsw feature enabled by
610+
CONFIG_CGROUP_MEM_RES_CTLR_SWAP could be disabled by the noswapaccount
611+
kernel parameter (introduced in 2.6.29-rc1). Later on, this decision
612+
turned out to be not ideal because we cannot have the feature compiled
613+
in and disabled by default and let only interested to enable it
614+
(e.g. general distribution kernels might need it). Therefore we have
615+
added swapaccount[=0|1] parameter (introduced in 2.6.37) which provides
616+
the both possibilities. If we remove noswapaccount we will have
617+
less command line parameters with the same functionality and we
618+
can also cleanup the parameter handling a bit ().
619+
Who: Michal Hocko <mhocko@suse.cz>
620+
621+
----------------------------

‎mm/memcontrol.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5034,6 +5034,7 @@ __setup("swapaccount", enable_swap_account);
50345034

50355035
static int __init disable_swap_account(char *s)
50365036
{
5037+
printk_once("noswapaccount is deprecated and will be removed in 2.6.40. Use swapaccount=0 instead\n");
50375038
enable_swap_account("=0");
50385039
return 1;
50395040
}

0 commit comments

Comments
 (0)