]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: remove direct page_cgroup-to-page pointer
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 23 Mar 2011 23:42:30 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:28 +0000 (19:46 -0700)
commit462b211741e8a0ea622f60d1bc80fcda39ac4203
tree6460e4e1ce206d391b862a3d398a9e22e33ecb3c
parent74f9baef47ad803810a8f44c75175c7e6e6aa03e
memcg: remove direct page_cgroup-to-page pointer

In struct page_cgroup, we have a full word for flags but only a few are
reserved.  Use the remaining upper bits to encode, depending on
configuration, the node or the section, to enable page_cgroup-to-page
lookups without a direct pointer.

This saves a full word for every page in a system with memory cgroups
enabled.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/page_cgroup.h
kernel/bounds.c
mm/memcontrol.c
mm/page_cgroup.c