Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430496
| From | "Hillf Danton" <hillf.zj@alibaba-inc.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm, vmscan: Make kswapd reclaim no more than needed |
| Date | 2016-06-24 11:10 +0200 |
| Message-ID | <rNvhF-6a1-67@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
We stop reclaiming pages if any eligible zone is balanced.
Signed-off-by: Hillf Danton <hillf.zj@alibaba-inc.com>
---
--- a/mm/vmscan.c Thu Jun 23 17:56:34 2016
+++ b/mm/vmscan.c Fri Jun 24 16:45:58 2016
@@ -3185,15 +3185,10 @@ static int balance_pgdat(pg_data_t *pgda
if (!populated_zone(zone))
continue;
- if (!zone_balanced(zone, sc.order, classzone_idx)) {
- classzone_idx = i;
- break;
- }
+ if (zone_balanced(zone, sc.order, classzone_idx))
+ goto out;
}
- if (i < 0)
- goto out;
-
/*
* Do some background aging of the anon list, to give
* pages a chance to be referenced before reclaiming. All
@@ -3236,19 +3231,6 @@ static int balance_pgdat(pg_data_t *pgda
/* Check if kswapd should be suspending */
if (try_to_freeze() || kthread_should_stop())
break;
-
- /*
- * Stop reclaiming if any eligible zone is balanced and clear
- * node writeback or congested.
- */
- for (i = 0; i <= classzone_idx; i++) {
- zone = pgdat->node_zones + i;
- if (!populated_zone(zone))
- continue;
-
- if (zone_balanced(zone, sc.order, classzone_idx))
- goto out;
- }
/*
* Raise priority if scanning rate is too low or there was no
--
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mm, vmscan: Make kswapd reclaim no more than needed "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-06-24 11:10 +0200 Re: [PATCH] mm, vmscan: Make kswapd reclaim no more than needed Mel Gorman <mgorman@techsingularity.net> - 2016-06-24 11:40 +0200
csiph-web