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)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 17 Jan 2024 17:15:53 +0000 (18:15 +0100)
commit39d2d2542a3535356f5003136f575ca1ac7f09f4
tree916d7e00f64b4cac2fcc738071abc8b06183f5ae
parent256a80cc1316be0cde696bd42c183698e4f6ad8e
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
Change-Id: Ice444a0c2c1812301d836c9a0d38532988362ea3
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>
[backport of the commit afaf07a65ddbdd70871cc3b81463f2a8f3884b6f from mainline]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
mm/vmscan.c