summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-02-22 15:45:58 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-12 06:44:10 +0100
commite2338022cdedb4d6b85385a3d1459f3086ff6fef (patch)
treeb298b43673062132102813f4972d5665902d9724 /include
parent3b156aab44c9190ca0573f008b7eeb7854f237d6 (diff)
downloadlinux-stable-e2338022cdedb4d6b85385a3d1459f3086ff6fef.tar.gz
linux-stable-e2338022cdedb4d6b85385a3d1459f3086ff6fef.tar.bz2
linux-stable-e2338022cdedb4d6b85385a3d1459f3086ff6fef.zip
mm, vmscan: cleanup lru size claculations
commit fd538803731e50367b7c59ce4ad3454426a3d671 upstream. lruvec_lru_size returns the full size of the LRU list while we sometimes need a value reduced only to eligible zones (e.g. for lowmem requests). inactive_list_is_low is one such user. Later patches will add more of them. Add a new parameter to lruvec_lru_size and allow it filter out zones which are not eligible for the given context. Link: http://lkml.kernel.org/r/20170117103702.28542-2-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f4aac87adcc3..82fc632fd11d 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -779,7 +779,7 @@ static inline struct pglist_data *lruvec_pgdat(struct lruvec *lruvec)
#endif
}
-extern unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru);
+extern unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru, int zone_idx);
#ifdef CONFIG_HAVE_MEMORY_PRESENT
void memory_present(int nid, unsigned long start, unsigned long end);