1
0
Fork 0
remarkable-linux/Documentation/cgroups
Johannes Weiner 1306a85aed mm: embed the memcg pointer directly into struct page
Memory cgroups used to have 5 per-page pointers.  To allow users to
disable that amount of overhead during runtime, those pointers were
allocated in a separate array, with a translation layer between them and
struct page.

There is now only one page pointer remaining: the memcg pointer, that
indicates which cgroup the page is associated with when charged.  The
complexity of runtime allocation and the runtime translation overhead is
no longer justified to save that *potential* 0.19% of memory.  With
CONFIG_SLUB, page->mem_cgroup actually sits in the doubleword padding
after the page->private member and doesn't even increase struct page,
and then this patch actually saves space.  Remaining users that care can
still compile their kernels without CONFIG_MEMCG.

     text    data     bss     dec     hex     filename
  8828345 1725264  983040 11536649 b00909  vmlinux.old
  8827425 1725264  966656 11519345 afc571  vmlinux.new

[mhocko@suse.cz: update Documentation/cgroups/memory.txt]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-10 17:41:09 -08:00
..
00-INDEX Documentation: cgroup: add documentation for net_cls cgroups. 2013-04-08 16:55:28 -04:00
blkio-controller.txt blk-throttle: implement proper hierarchy support 2013-05-14 13:52:38 -07:00
cgroups.txt cgroup: implement cgroup_subsys->css_reset() 2014-07-08 18:02:57 -04:00
cpuacct.txt Documentation: fix echo command in cgroups/cpuacct.txt 2011-07-23 10:58:08 -07:00
cpusets.txt cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags 2014-09-24 22:16:06 -04:00
devices.txt devcg: propagate local changes down the hierarchy 2013-03-20 07:50:21 -07:00
freezer-subsystem.txt cgroup_freezer: implement proper hierarchy support 2012-11-09 10:52:30 -08:00
hugetlb.txt mm: hugetlb_cgroup: convert to lockless page counters 2014-12-10 17:41:04 -08:00
memcg_test.txt mm: memcontrol: rewrite uncharge API 2014-08-08 15:57:17 -07:00
memory.txt mm: embed the memcg pointer directly into struct page 2014-12-10 17:41:09 -08:00
net_cls.txt netfilter: x_tables: lightweight process control group matching 2014-01-03 23:41:44 +01:00
net_prio.txt netprio_cgroup: allow nesting and inherit config on cgroup creation 2012-11-22 07:32:47 -08:00
unified-hierarchy.txt cgroup: distinguish the default and legacy hierarchies when handling cftypes 2014-07-15 11:05:10 -04:00