summaryrefslogtreecommitdiffstats
path: root/fs/pipe.c
diff options
context:
space:
mode:
authorVladimir Davydov2016-07-27 00:24:30 +0200
committerLinus Torvalds2016-07-27 01:19:19 +0200
commit3e79ec7ddc33e5c69c20ce7f768d0e5c8b824f69 (patch)
treea53369a4d3b1cdc06be5b2e54ec7b47a4498ad86 /fs/pipe.c
parentmm: memcontrol: teach uncharge_list to deal with kmem pages (diff)
downloadkernel-qcow2-linux-3e79ec7ddc33e5c69c20ce7f768d0e5c8b824f69.tar.gz
kernel-qcow2-linux-3e79ec7ddc33e5c69c20ce7f768d0e5c8b824f69.tar.xz
kernel-qcow2-linux-3e79ec7ddc33e5c69c20ce7f768d0e5c8b824f69.zip
arch: x86: charge page tables to kmemcg
Page tables can bite a relatively big chunk off system memory and their allocations are easy to trigger from userspace, so they should be accounted to kmemcg. This patch marks page table allocations as __GFP_ACCOUNT for x86. Note we must not charge allocations of kernel page tables, because they can be shared among processes from different cgroups so accounting them to a particular one can pin other cgroups for indefinitely long. So we clear __GFP_ACCOUNT flag if a page table is allocated for the kernel. Link: http://lkml.kernel.org/r/7d5c54f6a2bcbe76f03171689440003d87e6c742.1464079538.git.vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/pipe.c')
0 files changed, 0 insertions, 0 deletions