Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433458 > unrolled thread

[PATCH] mm, vmscan: Give up balancing node for high order allocations earlier

Started by"Hillf Danton" <hillf.zj@alibaba-inc.com>
First post2016-06-29 07:50 +0200
Last post2016-06-29 07:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm, vmscan: Give up balancing node for high order allocations earlier "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-06-29 07:50 +0200

#1433458 — [PATCH] mm, vmscan: Give up balancing node for high order allocations earlier

From"Hillf Danton" <hillf.zj@alibaba-inc.com>
Date2016-06-29 07:50 +0200
Subject[PATCH] mm, vmscan: Give up balancing node for high order allocations earlier
Message-ID<rPgxQ-ak-3@gated-at.bofh.it>
To avoid excessive reclaim, we give up rebalancing for high order 
allocations right after reclaiming enough pages.

Signed-off-by: Hillf Danton <hillf.zj@alibaba-inc.com>
---

 mm/vmscan.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index ee7e531..d080fb2 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3159,8 +3159,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
 
 	do {
 		bool raise_priority = true;
-
-		sc.nr_reclaimed = 0;
+		unsigned long reclaimed_pages = sc.nr_reclaimed;
 
 		/*
 		 * If the number of buffer_heads in the machine exceeds the
@@ -3254,7 +3253,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
 		 * Raise priority if scanning rate is too low or there was no
 		 * progress in reclaiming pages
 		 */
-		if (raise_priority || !sc.nr_reclaimed)
+		if (raise_priority || sc.nr_reclaimed == reclaimed_pages)
 			sc.priority--;
 	} while (sc.priority >= 1);
 
--

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web