diff options
author | 2021-06-28 19:37:50 -0700 | |
---|---|---|
committer | 2021-06-29 10:53:50 -0700 | |
commit | 2884b6b7eed4fc14c0630fb16e56a4c66c786d33 (patch) | |
tree | 7630515fb322a45d6806903ec2a1ea22ccbc6899 /mm/vmscan.c | |
parent | mm: memcontrol: fix page charging in page replacement (diff) | |
download | wireguard-linux-2884b6b7eed4fc14c0630fb16e56a4c66c786d33.tar.xz wireguard-linux-2884b6b7eed4fc14c0630fb16e56a4c66c786d33.zip |
mm: memcontrol: bail out early when !mm in get_mem_cgroup_from_mm
When mm is NULL, we do not need to hold rcu lock and call css_tryget for
the root memcg. And we also do not need to check !mm in every loop of
while. So bail out early when !mm.
Link: https://lkml.kernel.org/r/20210417043538.9793-3-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>
Acked-by: 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