[linux] 01/01: cgroups: Enable memory controller by default

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Jul 29 11:24:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit 0ddaf6aed3d33daa8d2d402d7f1d46729009e93c
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Fri Jul 29 12:23:32 2016 +0100

    cgroups: Enable memory controller by default
---
 debian/changelog                                   |  1 +
 debian/config/config                               |  1 -
 ...ument-the-Debian-memory-resource-controll.patch | 18 ----
 ...ow-memory-cgroup-support-to-be-included-b.patch | 95 ----------------------
 debian/patches/series                              |  2 -
 5 files changed, 1 insertion(+), 116 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0568c45..09fc90e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ linux (4.7~rc7-1~exp2) UNRELEASED; urgency=medium
     - nfc: NFC_PN533_USB replaced NFC_PN533
     - [armhf] dsa: NET_DSA_MV88E6XXX replaced NET_DSA_MV88E6{123,131,171}
     - [x86] ACPI: ACPI_TABLE_UPGRADE replaced ACPI_INITRD_TABLE_OVERRIDE
+  * cgroups: Enable memory controller by default
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 20 Jul 2016 03:50:18 +0100
 
diff --git a/debian/config/config b/debian/config/config
index 303d128..fb79160 100644
--- a/debian/config/config
+++ b/debian/config/config
@@ -5496,7 +5496,6 @@ CONFIG_NUMA_BALANCING=y
 # CONFIG_NUMA_BALANCING_DEFAULT_ENABLED is not set
 CONFIG_CGROUPS=y
 CONFIG_MEMCG=y
-CONFIG_MEMCG_DISABLED=y
 CONFIG_MEMCG_SWAP=y
 # CONFIG_MEMCG_SWAP_ENABLED is not set
 CONFIG_BLK_CGROUP=y
diff --git a/debian/patches/debian/cgroups-Document-the-Debian-memory-resource-controll.patch b/debian/patches/debian/cgroups-Document-the-Debian-memory-resource-controll.patch
deleted file mode 100644
index 2ac91ca..0000000
--- a/debian/patches/debian/cgroups-Document-the-Debian-memory-resource-controll.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Subject: cgroups: Document the Debian memory resource controller config change
-Forwarded: not-needed
-
----
---- a/Documentation/cgroup-v1/memory.txt
-+++ b/Documentation/cgroup-v1/memory.txt
-@@ -52,6 +52,10 @@ Features:
-  Kernel memory support is a work in progress, and the current version provides
-  basically functionality. (See Section 2.7)
- 
-+NOTE: In Debian kernel packages, the memory resource controller is
-+included but disabled by default.  Use the kernel parameter
-+'cgroup_enable=memory' to enable it.
-+
- Brief summary of control files.
- 
-  tasks				 # attach a task(thread) and show list of threads
diff --git a/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch b/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
deleted file mode 100644
index 7969b32..0000000
--- a/debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 10 Dec 2015 18:02:48 +0000
-Subject: cgroups: Allow memory cgroup support to be included but disabled
-Forwarded: no
-
-Memory cgroup support has some run-time overhead, so it's useful to
-include it in a distribution kernel without enabling it by default.
-Add a kernel config option to disable it by default and a kernel
-parameter 'cgroup_enable' as the opposite to 'cgroup_disable'.
-
-Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
-[Bastian Blank: Rename CGROUP_MEM_RES_CTLR_DISABLED to MEMCG_DISABLED]
----
---- a/Documentation/kernel-parameters.txt
-+++ b/Documentation/kernel-parameters.txt
-@@ -603,8 +603,8 @@ bytes respectively. Such letter suffixes
- 	ccw_timeout_log [S390]
- 			See Documentation/s390/CommonIO for details.
- 
--	cgroup_disable= [KNL] Disable a particular controller
--			Format: {name of the controller(s) to disable}
-+	cgroup_disable= [KNL] Disable/enable a particular controller
-+	cgroup_enable=	Format: {name of the controller(s) to disable/enable}
- 			The effects of cgroup_disable=foo are:
- 			- foo isn't auto-mounted if you mount all cgroups in
- 			  a single hierarchy
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -946,6 +946,14 @@ config MEMCG
- 	help
- 	  Provides control over the memory footprint of tasks in a cgroup.
- 
-+config MEMCG_DISABLED
-+	bool "Memory Resource Controller disabled by default"
-+	depends on MEMCG
-+	default n
-+	help
-+	  Disable the memory group resource controller unless explicitly
-+	  enabled using the kernel parameter "cgroup_enable=memory".
-+
- config MEMCG_SWAP
- 	bool "Swap controller"
- 	depends on MEMCG && SWAP
---- a/kernel/cgroup.c
-+++ b/kernel/cgroup.c
-@@ -5521,7 +5521,11 @@ int __init cgroup_init_early(void)
- 	return 0;
- }
- 
-+#ifdef CONFIG_MEMCG_DISABLED
-+static u16 cgroup_disable_mask __initdata = 1 << memory_cgrp_id;
-+#else
- static u16 cgroup_disable_mask __initdata;
-+#endif
- 
- /**
-  * cgroup_init - cgroup initialization
-@@ -6003,7 +6007,7 @@ out_free:
- 	kfree(pathbuf);
- }
- 
--static int __init cgroup_disable(char *str)
-+static int __init cgroup_set_disabled(char *str, int value)
- {
- 	struct cgroup_subsys *ss;
- 	char *token;
-@@ -6017,13 +6021,27 @@ static int __init cgroup_disable(char *s
- 			if (strcmp(token, ss->name) &&
- 			    strcmp(token, ss->legacy_name))
- 				continue;
--			cgroup_disable_mask |= 1 << i;
-+			if (value)
-+				cgroup_disable_mask |= 1 << i;
-+			else
-+				cgroup_disable_mask &= ~(1 << i);
- 		}
- 	}
- 	return 1;
- }
-+
-+static int __init cgroup_disable(char *str)
-+{
-+	return cgroup_set_disabled(str, 1);
-+}
- __setup("cgroup_disable=", cgroup_disable);
- 
-+static int __init cgroup_enable(char *str)
-+{
-+	return cgroup_set_disabled(str, 0);
-+}
-+__setup("cgroup_enable=", cgroup_enable);
-+
- static int __init cgroup_no_v1(char *str)
- {
- 	struct cgroup_subsys *ss;
diff --git a/debian/patches/series b/debian/patches/series
index a74f3be..c3ccd06 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -33,8 +33,6 @@ debian/fs-enable-link-security-restrictions-by-default.patch
 
 # Set various features runtime-disabled by default
 debian/sched-autogroup-disabled.patch
-features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
-debian/cgroups-Document-the-Debian-memory-resource-controll.patch
 debian/yama-disable-by-default.patch
 debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list