From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by kanga.kvack.org (Postfix) with ESMTP id 613CE828DF for ; Tue, 23 Feb 2016 10:19:43 -0500 (EST) Received: by mail-wm0-f45.google.com with SMTP id b205so204245081wmb.1 for ; Tue, 23 Feb 2016 07:19:43 -0800 (PST) Received: from outbound-smtp07.blacknight.com (outbound-smtp07.blacknight.com. [46.22.139.12]) by mx.google.com with ESMTPS id 200si40188684wms.27.2016.02.23.07.19.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 07:19:42 -0800 (PST) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp07.blacknight.com (Postfix) with ESMTPS id 2B9801C11EF for ; Tue, 23 Feb 2016 15:19:42 +0000 (GMT) Date: Tue, 23 Feb 2016 15:19:40 +0000 From: Mel Gorman Subject: [PATCH 21/27] mm, vmscan: Update classzone_idx if buffer_heads_over_limit Message-ID: <20160223151940.GG2854@techsingularity.net> References: <1456239890-20737-1-git-send-email-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1456239890-20737-1-git-send-email-mgorman@techsingularity.net> Sender: owner-linux-mm@kvack.org List-ID: To: Linux-MM Cc: Rik van Riel , Vlastimil Babka , Johannes Weiner , LKML 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 df1c834f3c1e..9f1492b077be 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2574,8 +2574,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, classzone_idx, 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