]> git.baikalelectronics.ru Git - kernel.git/commit
mm: vmscan: turn shrink_node_memcg() into shrink_lruvec()
authorJohannes Weiner <hannes@cmpxchg.org>
Sun, 1 Dec 2019 01:55:46 +0000 (17:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Dec 2019 20:59:07 +0000 (12:59 -0800)
commit60fff506f68c11aa38db74515968ac705519af39
tree1297446a9b8e0d5c377208f9c48bd4c25eab8c20
parent3b7c8058e7b8c8a4510badb59b7f9fd60ab3ff8b
mm: vmscan: turn shrink_node_memcg() into shrink_lruvec()

An lruvec holds LRU pages owned by a certain NUMA node and cgroup.
Instead of awkwardly passing around a combination of a pgdat and a memcg
pointer, pass down the lruvec as soon as we can look it up.

Nested callers that need to access node or cgroup properties can look them
them up if necessary, but there are only a few cases.

Link: http://lkml.kernel.org/r/20191022144803.302233-7-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c