From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754813AbcDFL2B (ORCPT ); Wed, 6 Apr 2016 07:28:01 -0400 Received: from outbound-smtp10.blacknight.com ([46.22.139.15]:34647 "EHLO outbound-smtp10.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754111AbcDFLVV (ORCPT ); Wed, 6 Apr 2016 07:21:21 -0400 From: Mel Gorman To: Linux-MM Cc: Rik van Riel , Vlastimil Babka , Johannes Weiner , LKML , Mel Gorman Subject: [PATCH 10/27] mm, vmscan: Clear congestion, dirty and need for compaction on a per-node basis Date: Wed, 6 Apr 2016 12:20:09 +0100 Message-Id: <1459941626-3290-11-git-send-email-mgorman@techsingularity.net> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1459941626-3290-1-git-send-email-mgorman@techsingularity.net> References: <1459941626-3290-1-git-send-email-mgorman@techsingularity.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Congested and dirty tracking of a node and whether reclaim should stall is still based on zone activity. This patch considers whether the kernel should stall based on node-based reclaim activity. Signed-off-by: Mel Gorman --- mm/vmscan.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a631972d49e1..c62505f9e8be 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3003,7 +3003,17 @@ static bool zone_balanced(struct zone *zone, int order, { unsigned long mark = high_wmark_pages(zone) + balance_gap; - return zone_watermark_ok_safe(zone, order, mark, classzone_idx); + if (!zone_watermark_ok_safe(zone, order, mark, classzone_idx)) + return false; + + /* + * If any eligible zone is balanced then the node is not considered + * to be congested or dirty + */ + clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags); + clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags); + + return true; } /* @@ -3149,13 +3159,6 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx) if (!zone_balanced(zone, order, 0, 0)) { classzone_idx = i; break; - } else { - /* - * If any eligible zone is balanced then the - * node is not considered congested or dirty. - */ - clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags); - clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags); } } @@ -3214,11 +3217,8 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx) if (!populated_zone(zone)) continue; - if (zone_balanced(zone, sc.order, 0, classzone_idx)) { - clear_bit(PGDAT_CONGESTED, &pgdat->flags); - clear_bit(PGDAT_DIRTY, &pgdat->flags); + if (zone_balanced(zone, sc.order, 0, classzone_idx)) goto out; - } } /* -- 2.6.4