From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id F0F23828EA for ; Thu, 9 Jun 2016 14:08:19 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id c82so25648702wme.2 for ; Thu, 09 Jun 2016 11:08:19 -0700 (PDT) Received: from outbound-smtp04.blacknight.com (outbound-smtp04.blacknight.com. [81.17.249.35]) by mx.google.com with ESMTPS id kq10si9230352wjc.2.2016.06.09.11.08.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 Jun 2016 11:08:19 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp04.blacknight.com (Postfix) with ESMTPS id 9727498E99 for ; Thu, 9 Jun 2016 18:08:18 +0000 (UTC) From: Mel Gorman Subject: [PATCH 20/27] mm, vmscan: Update classzone_idx if buffer_heads_over_limit Date: Thu, 9 Jun 2016 19:04:36 +0100 Message-Id: <1465495483-11855-21-git-send-email-mgorman@techsingularity.net> In-Reply-To: <1465495483-11855-1-git-send-email-mgorman@techsingularity.net> References: <1465495483-11855-1-git-send-email-mgorman@techsingularity.net> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton , Linux-MM Cc: Rik van Riel , Vlastimil Babka , Johannes Weiner , LKML , Mel Gorman If buffer heads are over the limit then the direct reclaim gfp_mask is promoted to __GFP_HIGHMEM so that lowmem is indirectly freed. With node-based reclaim, it is also required that the classzone_idx be updated or the pages will be skipped. Signed-off-by: Mel Gorman --- mm/vmscan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 3edf941e9965..7a2d69612231 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2547,8 +2547,10 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc, * highmem pages could be pinning lowmem pages storing buffer_heads */ orig_mask = sc->gfp_mask; - if (buffer_heads_over_limit) + if (buffer_heads_over_limit) { sc->gfp_mask |= __GFP_HIGHMEM; + classzone_idx = gfp_zone(sc->gfp_mask); + } for_each_zone_zonelist_nodemask(zone, z, zonelist, gfp_zone(sc->gfp_mask), sc->nodemask) { -- 2.6.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org