linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hillf Danton <dhillf@gmail.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: compaction: push isolate search base of compact control one pfn ahead
Date: Thu, 24 Nov 2011 20:38:14 +0800	[thread overview]
Message-ID: <CAJd=RBCJwyo3dQAYmE3oXBBDMDa5GkePfQ_Sct_YUt5=_1-ovw@mail.gmail.com> (raw)

After isolated the current pfn will no longer be scanned and isolated if the
next round is necessary, so push the isolate_migratepages search base of the
given compact_control one step ahead.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/compaction.c	Thu Nov 24 20:23:28 2011
+++ b/mm/compaction.c	Thu Nov 24 20:32:41 2011
@@ -365,8 +365,10 @@ static isolate_migrate_t isolate_migrate
 		nr_isolated++;

 		/* Avoid isolating too much */
-		if (cc->nr_migratepages == COMPACT_CLUSTER_MAX)
+		if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) {
+			++low_pfn;
 			break;
+		}
 	}

 	acct_isolated(zone, cc);

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2011-11-24 12:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 12:38 Hillf Danton [this message]
2011-11-24 14:03 ` Andrea Arcangeli

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='CAJd=RBCJwyo3dQAYmE3oXBBDMDa5GkePfQ_Sct_YUt5=_1-ovw@mail.gmail.com' \
    --to=dhillf@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox