+ cgroups-make-swap-accounting-default-behavior-configurable-update.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     cgroups-make-swap-accounting-default-behavior-configurable-update
has been added to the -mm tree.  Its filename is
     cgroups-make-swap-accounting-default-behavior-configurable-update.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cgroups-make-swap-accounting-default-behavior-configurable-update
From: Michal Hocko <mhocko@xxxxxxx>

Changes since v3:
* add 0|1 parameter values handling

Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
Cc: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx>
Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/kernel-parameters.txt |    6 ++++--
 mm/memcontrol.c                     |    8 ++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff -puN Documentation/kernel-parameters.txt~cgroups-make-swap-accounting-default-behavior-configurable-update Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~cgroups-make-swap-accounting-default-behavior-configurable-update
+++ a/Documentation/kernel-parameters.txt
@@ -2385,8 +2385,10 @@ and is between 256 and 4096 characters. 
 			improve throughput, but will also increase the
 			amount of memory reserved for use by the client.
 
-	swapaccount	[KNL] Enable accounting of swap in memory resource
-			controller. (See Documentation/cgroups/memory.txt)
+	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)
 
 	swiotlb=	[IA-64] Number of I/O TLB slabs
 
diff -puN mm/memcontrol.c~cgroups-make-swap-accounting-default-behavior-configurable-update mm/memcontrol.c
--- a/mm/memcontrol.c~cgroups-make-swap-accounting-default-behavior-configurable-update
+++ a/mm/memcontrol.c
@@ -4929,14 +4929,18 @@ struct cgroup_subsys mem_cgroup_subsys =
 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
 static int __init enable_swap_account(char *s)
 {
-	really_do_swap_account = 1;
+	/* consider enabled if no parameter or 1 is given */
+	if (!s || !strcmp(s, "1"))
+		really_do_swap_account = 1;
+	else if (!strcmp(s, "0"))
+		really_do_swap_account = 0;
 	return 1;
 }
 __setup("swapaccount", enable_swap_account);
 
 static int __init disable_swap_account(char *s)
 {
-	really_do_swap_account = 0;
+	enable_swap_account("0");
 	return 1;
 }
 __setup("noswapaccount", disable_swap_account);
_

Patches currently in -mm which might be from mhocko@xxxxxxx are

cgroups-make-swap-accounting-default-behavior-configurable.patch
cgroups-make-swap-accounting-default-behavior-configurable-update.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux