From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by kanga.kvack.org (Postfix) with ESMTP id BB506900015 for ; Mon, 8 Jun 2015 09:57:14 -0400 (EDT) Received: by wgbgq6 with SMTP id gq6so104187125wgb.3 for ; Mon, 08 Jun 2015 06:57:14 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id bq3si5339499wjc.50.2015.06.08.06.57.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Jun 2015 06:57:01 -0700 (PDT) From: Mel Gorman Subject: [PATCH 16/25] mm, vmscan: Update classzone_idx if buffer_heads_over_limit Date: Mon, 8 Jun 2015 14:56:22 +0100 Message-Id: <1433771791-30567-17-git-send-email-mgorman@suse.de> In-Reply-To: <1433771791-30567-1-git-send-email-mgorman@suse.de> References: <1433771791-30567-1-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-ID: To: Linux-MM Cc: Rik van Riel , Johannes Weiner , Michal Hocko , 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 2a3050d7dc95..140aeefdebe1 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2497,8 +2497,10 @@ static bool 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.3.5 -- 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