commit a6e21b14f22041382e832d30deda6f26f37b1097 upstream. Currently it's calculated once per zone in the zonelist.
Signed-off-by: Mel Gorman <mgor...@suse.de> Acked-by: Johannes Weiner <han...@cmpxchg.org> Reviewed-by: Rik van Riel <r...@redhat.com> Cc: Vlastimil Babka <vba...@suse.cz> Cc: Jan Kara <j...@suse.cz> Cc: Michal Hocko <mho...@suse.cz> Cc: Hugh Dickins <hu...@google.com> Cc: Dave Hansen <dave.han...@intel.com> Cc: Theodore Ts'o <ty...@mit.edu> Cc: "Paul E. McKenney" <paul...@linux.vnet.ibm.com> Cc: Oleg Nesterov <o...@redhat.com> Cc: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...@linux-foundation.org> Signed-off-by: Mel Gorman <mgor...@suse.de> --- mm/page_alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2e7ec3c..cb4cadd 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1915,6 +1915,8 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order, nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */ int zlc_active = 0; /* set if using zonelist_cache */ int did_zlc_setup = 0; /* just call zlc_setup() one time */ + bool consider_zone_dirty = (alloc_flags & ALLOC_WMARK_LOW) && + (gfp_mask & __GFP_WRITE); zonelist_scan: /* @@ -1973,8 +1975,7 @@ zonelist_scan: * will require awareness of zones in the * dirty-throttling and the flusher threads. */ - if ((alloc_flags & ALLOC_WMARK_LOW) && - (gfp_mask & __GFP_WRITE) && !zone_dirty_ok(zone)) + if (consider_zone_dirty && !zone_dirty_ok(zone)) continue; mark = zone->watermark[alloc_flags & ALLOC_WMARK_MASK]; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html