aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorGlauber Costa <[email protected]>2012-12-18 14:21:56 -0800
committerLinus Torvalds <[email protected]>2012-12-18 15:02:12 -0800
commit7ae1e1d0f8ac2927ed7e3ca6d15e42d485903459 (patch)
tree6b95f008400510bee9a7742ee21bf5316a59f851 /lib/mpi/mpi-cmp.c
parent7a64bf05b2a6fe3703062d13d389e3eb904741c6 (diff)
memcg: kmem controller infrastructure
Introduce infrastructure for tracking kernel memory pages to a given memcg. This will happen whenever the caller includes the flag __GFP_KMEMCG flag, and the task belong to a memcg other than the root. In memcontrol.h those functions are wrapped in inline acessors. The idea is to later on, patch those with static branches, so we don't incur any overhead when no mem cgroups with limited kmem are being used. Users of this functionality shall interact with the memcg core code through the following functions: memcg_kmem_newpage_charge: will return true if the group can handle the allocation. At this point, struct page is not yet allocated. memcg_kmem_commit_charge: will either revert the charge, if struct page allocation failed, or embed memcg information into page_cgroup. memcg_kmem_uncharge_page: called at free time, will revert the charge. Signed-off-by: Glauber Costa <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Kamezawa Hiroyuki <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Tejun Heo <[email protected]> Cc: David Rientjes <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Greg Thelen <[email protected]> Cc: JoonSoo Kim <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Suleiman Souhlal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions