Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1340620
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 11/27] mm, vmscan: Clear congestion, dirty and need for compaction on a per-node basis |
| Date | 2016-02-23 14:50 +0100 |
| Message-ID | <r5lvI-69z-29@gated-at.bofh.it> (permalink) |
| References | <r5lvH-69z-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <mgorman@techsingularity.net>
---
mm/vmscan.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index fe004cb11b71..1f5d3829d35e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2988,7 +2988,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;
}
/*
@@ -3133,13 +3143,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);
}
}
@@ -3199,11 +3202,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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 00/27] Move LRU page reclaim from zones to nodes v2 Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 12/27] mm: vmscan: Do not reclaim from kswapd if there is any eligible zone Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 11/27] mm, vmscan: Clear congestion, dirty and need for compaction on a per-node basis Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 02/27] mm, vmscan: Check if cpusets are enabled during direct reclaim Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 08/27] mm, vmscan: Make kswapd reclaim in terms of nodes Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 13/27] mm, vmscan: Make shrink_node decisions more node-centric Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 09/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 10/27] mm, vmscan: By default have direct reclaim only shrink once per node Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 04/27] mm, vmscan: Move lru_lock to the node Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 14:50 +0100 [PATCH 14/27] mm, memcg: Move memcg limit enforcement from zones to nodes Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 15:00 +0100 [PATCH 15/27] mm, workingset: Make working set detection node-aware Mel Gorman <mgorman@techsingularity.net> - 2016-02-23 15:00 +0100
csiph-web