[PATCH] memsw: remove noswapaccount kernel parameter
From: Michal Hocko
Date: Fri Jan 28 2011 - 02:57:32 EST
noswapaccount parameter has been deprecated for some time without any
complains from users so we can remove it. swapaccount=0|1 can be used
instead.
As we are removing the parameter we can also cleanup swapaccount
because it doesn't have to accept an empty string anymore (to match
noswapaccount) and so we can push = into __setup macro rather than
checking "=1" resp. "=0" strings
Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
---
Documentation/kernel-parameters.txt | 3 ---
mm/memcontrol.c | 13 +++----------
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b72e071..a8fe114 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1746,9 +1746,6 @@ and is between 256 and 4096 characters. It is defined in the file
nosoftlockup [KNL] Disable the soft-lockup detector.
- noswapaccount [KNL] Disable accounting of swap in memory resource
- controller. (See Documentation/cgroups/memory.txt)
-
nosync [HW,M68K] Disables sync negotiation for all devices.
notsc [BUGS=X86-32] Disable Time Stamp Counter
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 0387287..96c3471 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5013,19 +5013,12 @@ struct cgroup_subsys mem_cgroup_subsys = {
static int __init enable_swap_account(char *s)
{
/* consider enabled if no parameter or 1 is given */
- if (!(*s) || !strcmp(s, "=1"))
+ if (!strcmp(s, "1"))
really_do_swap_account = 1;
- else if (!strcmp(s, "=0"))
+ else if (!strcmp(s, "0"))
really_do_swap_account = 0;
return 1;
}
-__setup("swapaccount", enable_swap_account);
+__setup("swapaccount=", enable_swap_account);
-static int __init disable_swap_account(char *s)
-{
- printk_once("noswapaccount is deprecated and will be removed in 2.6.40. Use swapaccount=0 instead\n");
- enable_swap_account("=0");
- return 1;
-}
-__setup("noswapaccount", disable_swap_account);
#endif
--
1.7.2.3
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/