All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: 'Mel Gorman' <mgorman@techsingularity.net>
Cc: 'Johannes Weiner' <hannes@cmpxchg.org>,
	'Vlastimil Babka' <vbabka@suse.cz>,
	'linux-kernel' <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, 'Andrew Morton' <akpm@linux-foundation.org>
Subject: [PATCH] mm, vmscan: Give up balancing node for high order allocations earlier
Date: Wed, 29 Jun 2016 13:42:12 +0800	[thread overview]
Message-ID: <00ed01d1d1c8$fcb12ff0$f6138fd0$@alibaba-inc.com> (raw)

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);
 
--

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "'Mel Gorman'" <mgorman@techsingularity.net>
Cc: "'Johannes Weiner'" <hannes@cmpxchg.org>,
	"'Vlastimil Babka'" <vbabka@suse.cz>,
	"'linux-kernel'" <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>,
	"'Andrew Morton'" <akpm@linux-foundation.org>
Subject: [PATCH] mm, vmscan: Give up balancing node for high order allocations earlier
Date: Wed, 29 Jun 2016 13:42:12 +0800	[thread overview]
Message-ID: <00ed01d1d1c8$fcb12ff0$f6138fd0$@alibaba-inc.com> (raw)

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);
 
--

             reply	other threads:[~2016-06-29  5:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  5:42 Hillf Danton [this message]
2016-06-29  5:42 ` [PATCH] mm, vmscan: Give up balancing node for high order allocations earlier Hillf Danton
2016-07-11 22:20 ` Andrew Morton
2016-07-11 22:20   ` Andrew Morton
2016-07-12  6:32   ` Hillf Danton
2016-07-12  6:32     ` Hillf Danton
2016-07-12  8:33     ` Mel Gorman
2016-07-12  8:33       ` Mel Gorman
2016-07-12  8:48       ` Hillf Danton
2016-07-12  8:48         ` Hillf Danton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00ed01d1d1c8$fcb12ff0$f6138fd0$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.