aboutsummaryrefslogtreecommitdiffstats
path: root/features/cgroups
AgeCommit message (Collapse)Author
2017-11-02cgroups.cfg: Add missing controllersJason Wessel
The the new controllers were added several kernels back and are required for additional functionality. These are applicable to the 4.9 kernel and newer. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-07-26cgroups: remove obselete optionsBruce Ashfield
commit d886f4e483ce63a3304adc9eda87031b93341c28 Author: Johannes Weiner <hannes@cmpxchg.org> Date: Wed Jan 20 15:02:47 2016 -0800 mm: memcontrol: rein in the CONFIG space madness What CONFIG_INET and CONFIG_LEGACY_KMEM guard inside the memory controller code is insignificant, having these conditionals is not worth the complication and fragility that comes with them. [akpm@linux-foundation.org: rework mem_cgroup_css_free() statement ordering] Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-02-11meta: remove invalid options for 3.19Bruce Ashfield
The removed options in this commit are no longer valid in a 3.19 kernel. None have replacement values, and are simply obselete, so we remove them from our configuration. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-09-03cgroups: skip vm cgroups for v3.17-rcBruce Ashfield
vm cgroups is not ready for v3.17, so we comment it out for now. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-08-19cgroups: enable virtual memory resource controllerHe Zhe
Enable virtual memory resource controller for convenience Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-08-19vm_cgroup: basic infrastructureBruce Ashfield
1/7 [ Author: Vladimir Davydov Email: vdavydov@parallels.com Subject: vm_cgroup: basic infrastructure Date: Fri, 8 Aug 2014 09:20:33 +0800 Taken from https://lkml.org/lkml/2014/7/3/407 This patch introduces the vm cgroup to control address space expansion of tasks that belong to a cgroup. The idea is to provide a mechanism to limit memory overcommit not only for the whole system, but also on per cgroup basis. This patch only adds some basic cgroup methods, like alloc/free and write/read, while the real accounting/limiting is done in the following patches. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 2/7 [ Author: He Zhe Email: zhe.he@windriver.com Subject: vm_cgroup: backport dependence to fix vm_cgroup infrastructure compile failure Date: Fri, 8 Aug 2014 09:20:34 +0800 Backport necessary dependence from v3.16-rc2 on which the original patch is based to fix compile failure. - Change IS_ENABLED to IS_SUBSYS_ENABLED which is defined by include/linux/subsys_cgroup.h - Modify proc interface to meet current definition - Change vm_cgrp_subsys to vm_subsys which is generated by include/linux/cgroup.h - Add name and subsys_id fields for vm_subsys Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 3/7 [ Author: Vladimir Davydov Email: vdavydov@parallels.com Subject: vm_cgroup: private writable mappings accounting Date: Fri, 8 Aug 2014 09:20:35 +0800 Taken from https://lkml.org/lkml/2014/7/3/408 Address space that contributes to memory overcommit consists of two parts - private writable mappings and shared memory. This patch adds private writable mappings accounting. The implementation is quite simple. Each mm holds a reference to the vm cgroup it is accounted to. The reference is initialized with the current cgroup on mm creation and released only on mm destruction. For simplicity, task migrations as well as mm owner changes are not handled yet, so an offline cgroup will be pinned in memory until all mm's accounted to it die. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 4/7 [ Author: He Zhe Email: zhe.he@windriver.com Subject: vm_cgroup: backport dependence to fix vm_cgroup mappings accounting compile failure Date: Fri, 8 Aug 2014 09:20:36 +0800 Backport necessary dependence from v3.16-rc2 on which the original patch is based on to fix compile failure. - Backport css_tryget_online and percpu_ref_tryget_live for get_vm_cgroup_from_task - Change vm_cgrp_id to vm_subsys_id which is generated by include/linux/cgroup.h Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 5/7 [ Author: Vladimir Davydov Email: vdavydov@parallels.com Subject: shmem: pass inode to shmem_acct_* methods Date: Fri, 8 Aug 2014 09:20:37 +0800 Taken from https://lkml.org/lkml/2014/7/3/406 This will be used by the next patch. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 6/7 [ Author: Vladimir Davydov Email: vdavydov@parallels.com Subject: vm_cgroup: shared memory accounting Date: Fri, 8 Aug 2014 09:20:38 +0800 Taken from https://lkml.org/lkml/2014/7/3/409 Address space that contributes to memory overcommit consists of two parts - private writable mappings and shared memory. This patch adds shared memory accounting. Each shmem inode holds a reference to the vm cgroup it is accounted to. The reference is initialized with the current cgroup on shmem inode creation and released only on shmem inode destruction. For simplicity, shmem inodes accounted to a vm cgroup are not re-charged to the parent on css offline yet, so offline cgroups will be hanging in memory until all inodes accounted to it die. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 7/7 [ Author: Vladimir Davydov Email: vdavydov@parallels.com Subject: vm_cgroup: do not charge tasks in root cgroup Date: Fri, 8 Aug 2014 09:20:39 +0800 Taken from https://lkml.org/lkml/2014/7/3/410 For the root cgroup (the whole system), we already have overcommit accounting and control, so we can skip charging tasks in the root cgroup to avoid overhead. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-08-19cgroups: Resource controller for open files.Bruce Ashfield
1/2 [ Author: Binder Makin Email: merimus@google.com Subject: cgroups: Resource controller for open files. Date: Wed, 30 Jul 2014 16:58:51 +0800 lkml https://lkml.org/lkml/2014/7/2/640 upstream Add a resource controller for limiting the number of open file handles. This allows us to catch misbehaving processes and return EMFILE instead of ENOMEM for kernel memory limits. Signed-off-by: Binder Makin <merimus@google.com> Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] 2/2 [ Author: He Zhe Email: zhe.he@windriver.com Subject: Fix [RFC] cgroups: Resource controller for open files. Date: Wed, 30 Jul 2014 16:58:52 +0800 The original patch is based on: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fad01e866afdbe01a1f3ec06a39c3a8b9e197014 3.15-rc8 Modify variable and macro in fs/filescontrol.c and include/linux/cgroup_subsys.h according to target version. Correct wrong handling which causes boot failure in fs/file.c. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2013-02-12meta: rename CONFIG_CGROUP_MEM_RES_CTLR optionsBruce Ashfield
commit c255a458055e459f65eb7b7f51dc5dbdd0caf1d8 Author: Andrew Morton <akpm@linux-foundation.org> Date: Tue Jul 31 16:43:02 2012 -0700 memcg: rename config variables Sanity: CONFIG_CGROUP_MEM_RES_CTLR -> CONFIG_MEMCG CONFIG_CGROUP_MEM_RES_CTLR_SWAP -> CONFIG_MEMCG_SWAP CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED -> CONFIG_MEMCG_SWAP_ENABLED CONFIG_CGROUP_MEM_RES_CTLR_KMEM -> CONFIG_MEMCG_KMEM [mhocko@suse.cz: fix missed bits] Cc: Glauber Costa <glommer@parallels.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Hugh Dickins <hughd@google.com> Cc: Tejun Heo <tj@kernel.org> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2012-06-28cgroups: delete obsolete namespace optionPaul Gortmaker
Removed in mainline commit a77aea92010acf54ad785047234418d5d68772e2 ----------- cgroup: remove the ns_cgroup The ns_cgroup is an annoying cgroup at the namespace / cgroup frontier and leads to some problems: * cgroup creation is out-of-control * cgroup name can conflict when pids are looping * it is not possible to have a single process handling a lot of namespaces without falling in a exponential creation time * we may want to create a namespace without creating a cgroup The ns_cgroup was replaced by a compatibility flag 'clone_children', where a newly created cgroup will copy the parent cgroup values. The userspace has to manually create a cgroup and add a task to the 'tasks' file. This patch removes the ns_cgroup as suggested in the following thread: https://lists.linux-foundation.org/pipermail/containers/2009-June/018616.html [...] ----------- Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-06-20net_sched: move content out of cgroups dirPaul Gortmaker
Make this a separate subdir of its own since it isn't strictly related to cgroups, and we want a home for backports of new net sched plugins. Also fix the missing ".scc" extension on the cgroups include, which isn't strictly required, but git grep can find it easier. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-06-19cgroups: re-enable net_traffic config fragmentPaul Gortmaker
The net_traffic.scc file was commented out "pending uprev" but that really just applied to the blkio content, since the net one is purely configurational and not containing patches. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-06-19cgroups: delete old blkio patchesPaul Gortmaker
As seen here: http://sourceforge.net/projects/ioband/files/ the files have been abandoned (last change in 2009) with the retooled solution from the same author going upstream: http://lwn.net/Articles/413015/ Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-01-27add descriptions to optional features and configsBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2012-01-27meta: add feature descriptions to optional/addon featuresBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-09-21meta: kconfig warning cleanupBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-07-203.0: patch cleanup and pruningBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-06-21meta: enable freezer supportBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-06-21meta: add namespaces + experimental configsBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-06-21meta: re-nable cgroups options in the standard kernelBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2011-04-04yocto: import of the kernel content/metadata from v2.6.39Paul Gortmaker
Roughly corresponds to: commit db575247e16e50ce5160e18907e253c6a43b6feb Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Mon Apr 4 00:27:55 2011 -0400 yocto: 2.6.39 baseline Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> ...in the full history repo, but with some extraneous files that were deleted post db575247 deleted right here and now at the baseline instead. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>