[PATCH] memcg: get rid of swapaccount leftovers

From: Michal Hocko
Date: Thu Aug 15 2013 - 03:40:31 EST


swapaccount kernel parameter without any values has been removed by
a2c8990a (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.

Reported-by: Gergely Risko <gergely@xxxxxxxx>
Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
---
Documentation/kernel-parameters.txt | 2 +-
init/Kconfig | 2 +-
mm/memcontrol.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2fe6e76..6a95a03 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2941,7 +2941,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
improve throughput, but will also increase the
amount of memory reserved for use by the client.

- swapaccount[=0|1]
+ swapaccount=[0|1]
[KNL] Enable accounting of swap in memory resource
controller if no parameter or 1 is given or disable
it if 0 is given (See Documentation/cgroups/memory.txt)
diff --git a/init/Kconfig b/init/Kconfig
index 2bee57c..49cd8af 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -915,7 +915,7 @@ config MEMCG_SWAP_ENABLED
Memory Resource Controller Swap Extension comes with its price in
a bigger memory consumption. General purpose distribution kernels
which want to enable the feature but keep it disabled by default
- and let the user enable it by swapaccount boot command line
+ and let the user enable it by swapaccount=1 boot command line
parameter should have this option unselected.
For those who want to have the feature enabled by default should
select this option (if, for some reason, they need to disable it
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b73988a..61e9827 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6785,7 +6785,6 @@ struct cgroup_subsys mem_cgroup_subsys = {
#ifdef CONFIG_MEMCG_SWAP
static int __init enable_swap_account(char *s)
{
- /* consider enabled if no parameter or 1 is given */
if (!strcmp(s, "1"))
really_do_swap_account = 1;
else if (!strcmp(s, "0"))
--
1.7.10.4

--
Michal Hocko
SUSE Labs
--
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/