]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - mm/vmscan.c
mm, vmscan: cleanup lru size claculations
authorMichal Hocko <mhocko@suse.com>
Wed, 22 Feb 2017 23:45:58 +0000 (15:45 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 13 Mar 2017 21:20:54 +0000 (15:20 -0600)
commitae9ab9954a47ad9965a4020554965a61c91eb97c
tree3c54059258a6314cf916e89a1e207909cc208fdd
parentb131af0b9f5c82d0618114d96c65a970d968b613
mm, vmscan: cleanup lru size claculations

BugLink: http://bugs.launchpad.net/bugs/1672544
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/linux/mmzone.h
mm/vmscan.c
mm/workingset.c