|
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>
|