summaryrefslogtreecommitdiffstats
path: root/include/linux/math64.h
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2018-10-26 15:03:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-26 16:25:19 -0700
commit591edfb10a949d635ed770c6e85ec5286206c07e (patch)
treed085b927bfab87a1b81d23fa5885fed531a1d728 /include/linux/math64.h
parent9b6f7e163cd0f468d1b9696b785659d3c27c8667 (diff)
downloadlinux-591edfb10a949d635ed770c6e85ec5286206c07e.tar.gz
linux-591edfb10a949d635ed770c6e85ec5286206c07e.tar.bz2
linux-591edfb10a949d635ed770c6e85ec5286206c07e.zip
mm: drain memcg stocks on css offlining
Memcg charge is batched using per-cpu stocks, so an offline memcg can be pinned by a cached charge up to a moment, when a process belonging to some other cgroup will charge some memory on the same cpu. In other words, cached charges can prevent a memory cgroup from being reclaimed for some time, without any clear need. Let's optimize it by explicit draining of all stocks on css offlining. As draining is performed asynchronously, and is skipped if any parallel draining is happening, it's cheap. Link: http://lkml.kernel.org/r/20180827162621.30187-2-guro@fb.com Signed-off-by: Roman Gushchin <guro@fb.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Michal Hocko <mhocko@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/math64.h')
0 files changed, 0 insertions, 0 deletions