summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorVladimir Davydov <vdavydov@virtuozzo.com>2016-08-02 23:03:01 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 23:31:41 +0200
commit05eb6e7263185a6bb0de9501ccf2addc52429414 (patch)
tree5f2df8d8db78523351abf46c7f97e9be332788f7 /mm
parentkasan: avoid overflowing quarantine size on low memory systems (diff)
downloadlinux-05eb6e7263185a6bb0de9501ccf2addc52429414.tar.xz
linux-05eb6e7263185a6bb0de9501ccf2addc52429414.zip
radix-tree: account nodes to memcg only if explicitly requested
Radix trees may be used not only for storing page cache pages, so unconditionally accounting radix tree nodes to the current memory cgroup is bad: if a radix tree node is used for storing data shared among different cgroups we risk pinning dead memory cgroups forever. So let's only account radix tree nodes if it was explicitly requested by passing __GFP_ACCOUNT to INIT_RADIX_TREE. Currently, we only want to account page cache entries, so mark mapping->page_tree so. Fixes: 58e698af4c63 ("radix-tree: account radix_tree_node to memory cgroup") Link: http://lkml.kernel.org/r/1470057188-7864-1-git-send-email-vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: <stable@vger.kernel.org> [4.6+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions