aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorMuchun Song <songmuchun@bytedance.com>2021-06-28 19:38:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 10:53:50 -0700
commit9838354e16a2a920d5a228559850d10fa588a18d (patch)
treeb8c00b505726ab6a9cba21d454d42dfcbad09559 /mm/vmscan.c
parentmm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec (diff)
downloadwireguard-linux-9838354e16a2a920d5a228559850d10fa588a18d.tar.xz
wireguard-linux-9838354e16a2a920d5a228559850d10fa588a18d.zip
mm: memcontrol: simplify the logic of objcg pinning memcg
The obj_cgroup_release() and memcg_reparent_objcgs() are serialized by the css_set_lock. We do not need to care about objcg->memcg being released in the process of obj_cgroup_release(). So there is no need to pin memcg before releasing objcg. Remove those pinning logic to simplfy the code. There are only two places that modifies the objcg->memcg. One is the initialization to objcg->memcg in the memcg_online_kmem(), another is objcgs reparenting in the memcg_reparent_objcgs(). It is also impossible for the two to run in parallel. So xchg() is unnecessary and it is enough to use WRITE_ONCE(). Link: https://lkml.kernel.org/r/20210417043538.9793-7-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Roman Gushchin <guro@fb.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Xiongchun Duan <duanxiongchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
0 files changed, 0 insertions, 0 deletions