Files
kernel_arpi/include/linux
Muchun Song f2e4d28dd9 mm: memcontrol: simplify lruvec_holds_page_lru_lock
We already have a helper lruvec_memcg() to get the memcg from lruvec, we
do not need to do it ourselves in the lruvec_holds_page_lru_lock().  So
use lruvec_memcg() instead.  And if mem_cgroup_disabled() returns false,
the page_memcg(page) (the LRU pages) cannot be NULL.  So remove the odd
logic of "memcg = page_memcg(page) ?  : root_mem_cgroup".  And use
lruvec_pgdat to simplify the code.  We can have a single definition for
this function that works for !CONFIG_MEMCG, CONFIG_MEMCG +
mem_cgroup_disabled() and CONFIG_MEMCG.

Link: https://lkml.kernel.org/r/20210417043538.9793-5-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>
2021-06-29 10:53:50 -07:00
..
2021-05-18 17:24:52 +01:00
2021-05-06 19:24:11 -07:00
2021-05-08 21:49:48 -06:00
2021-05-24 12:45:26 -04:00
2021-05-24 12:45:26 -04:00
2021-05-06 19:24:11 -07:00
2021-04-19 13:13:26 -04:00
2021-06-29 10:53:48 -07:00
2021-04-30 11:20:40 -07:00
2021-06-29 10:53:48 -07:00
2021-04-21 10:24:41 -05:00
2021-06-29 10:53:49 -07:00
2021-04-15 10:32:17 +02:00
2021-04-26 22:55:12 +01:00
2021-06-24 19:40:53 -07:00
2021-04-16 15:31:02 -07:00