Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1418544
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/27] mm, vmscan: Remove balance gap |
| Date | 2016-06-09 20:10 +0200 |
| Message-ID | <rIcyZ-1vR-11@gated-at.bofh.it> (permalink) |
| References | <rIcyZ-1vR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The balance gap was introduced to apply equal pressure to all zones when
reclaiming for a higher zone. With node-based LRU, the need for the balance
gap is removed and the code is dead so remove it.
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
mm/vmscan.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9368af4cfb06..96bf841f9352 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2488,7 +2488,7 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc,
*/
static inline bool compaction_ready(struct zone *zone, int order, int classzone_idx)
{
- unsigned long balance_gap, watermark;
+ unsigned long watermark;
bool watermark_ok;
/*
@@ -2497,9 +2497,7 @@ static inline bool compaction_ready(struct zone *zone, int order, int classzone_
* there is a buffer of free pages available to give compaction
* a reasonable chance of completing and allocating the page
*/
- balance_gap = min(low_wmark_pages(zone), DIV_ROUND_UP(
- zone->managed_pages, KSWAPD_ZONE_BALANCE_GAP_RATIO));
- watermark = high_wmark_pages(zone) + balance_gap + (2UL << order);
+ watermark = high_wmark_pages(zone) + (2UL << order);
watermark_ok = zone_watermark_ok_safe(zone, 0, watermark, classzone_idx);
/*
@@ -2962,10 +2960,9 @@ static void age_active_anon(struct pglist_data *pgdat,
} while (memcg);
}
-static bool zone_balanced(struct zone *zone, int order,
- unsigned long balance_gap, int classzone_idx)
+static bool zone_balanced(struct zone *zone, int order, int classzone_idx)
{
- unsigned long mark = high_wmark_pages(zone) + balance_gap;
+ unsigned long mark = high_wmark_pages(zone);
return zone_watermark_ok_safe(zone, order, mark, classzone_idx);
}
@@ -3007,7 +3004,7 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining,
if (!populated_zone(zone))
continue;
- if (zone_balanced(zone, order, 0, classzone_idx))
+ if (zone_balanced(zone, order, classzone_idx))
return true;
}
@@ -3110,7 +3107,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
break;
}
- if (!zone_balanced(zone, order, 0, 0)) {
+ if (!zone_balanced(zone, order, 0)) {
classzone_idx = i;
break;
} else {
@@ -3178,7 +3175,7 @@ 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)) {
+ if (zone_balanced(zone, sc.order, classzone_idx)) {
clear_bit(PGDAT_CONGESTED, &pgdat->flags);
clear_bit(PGDAT_DIRTY, &pgdat->flags);
goto out;
@@ -3389,7 +3386,7 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx)
}
if (!waitqueue_active(&pgdat->kswapd_wait))
return;
- if (zone_balanced(zone, order, 0, 0))
+ if (zone_balanced(zone, order, 0))
return;
trace_mm_vmscan_wakeup_kswapd(pgdat->node_id, zone_idx(zone), order);
--
2.6.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/27] Move LRU page reclaim from zones to nodes v6 Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 25/27] mm: page_alloc: Cache the last node whose dirty limit is reached Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 07/27] mm, vmscan: Remove balance gap Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 02/27] mm, vmscan: Move lru_lock to the node Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
Re: [PATCH 02/27] mm, vmscan: Move lru_lock to the node Vlastimil Babka <vbabka@suse.cz> - 2016-06-10 18:40 +0200
Re: [PATCH 02/27] mm, vmscan: Move lru_lock to the node Peter Zijlstra <peterz@infradead.org> - 2016-06-10 19:50 +0200
[PATCH 21/27] mm, vmscan: Only wakeup kswapd once per node for the requested classzone Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 18/27] mm: Move most file-based accounting to the node Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 17/27] mm: Rename NR_ANON_PAGES to NR_ANON_MAPPED Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 23/27] mm, vmscan: Add classzone information to tracepoints Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 10/27] mm, vmscan: Clear congestion, dirty and need for compaction on a per-node basis Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 20/27] mm, vmscan: Update classzone_idx if buffer_heads_over_limit Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 27/27] mm: vmstat: Account per-zone stalls and pages skipped during reclaim Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 01/27] mm, vmstat: Add infrastructure for per-node vmstats Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
Re: [PATCH 01/27] mm, vmstat: Add infrastructure for per-node vmstats Vlastimil Babka <vbabka@suse.cz> - 2016-06-10 15:40 +0200
Re: [PATCH 01/27] mm, vmstat: Add infrastructure for per-node vmstats Mel Gorman <mgorman@techsingularity.net> - 2016-06-10 15:50 +0200
[PATCH 15/27] mm, page_alloc: Consider dirtyable memory in terms of nodes Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 04/27] mm, vmscan: Begin reclaiming pages on a per-node basis Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 19/27] mm: Move vmscan writes and file write accounting to the node Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 12/27] mm, vmscan: Make shrink_node decisions more node-centric Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:10 +0200
[PATCH 16/27] mm: Move page mapped accounting to the node Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 22/27] mm: Convert zone_reclaim to node_reclaim Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 09/27] mm, vmscan: By default have direct reclaim only shrink once per node Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 14/27] mm, workingset: Make working set detection node-aware Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 24/27] mm, page_alloc: Remove fair zone allocation policy Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 13/27] mm, memcg: Move memcg limit enforcement from zones to nodes Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:20 +0200
[PATCH 26/27] mm: vmstat: Replace __count_zone_vm_events with a zone id equivalent Mel Gorman <mgorman@techsingularity.net> - 2016-06-09 20:30 +0200
Re: [PATCH 03/27] mm, vmscan: Move LRU lists to node Vlastimil Babka <vbabka@suse.cz> - 2016-06-10 20:10 +0200
csiph-web