linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: akpm@linux-foundation.org
Cc: mgorman@suse.de, linux-mm@kvack.org, shijie8@gmail.com,
	Huang Shijie <b32955@freescale.com>
Subject: [PATCH] mm/compaction : fix the wrong return value for isolate_migratepages()
Date: Sat, 31 Dec 2011 16:46:48 +0800	[thread overview]
Message-ID: <1325321208-15778-1-git-send-email-b32955@freescale.com> (raw)

When we do not get any migrate page, we should return ISOLATE_NONE.
If we return ISOLATE_SUCCESS in this case, we may migrate the NORMAL
zone's pages to DMA zone.

Signed-off-by: Huang Shijie <b32955@freescale.com>
---
 mm/compaction.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 0f12cc9..3db8630 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -376,7 +376,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
 
 	trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);
 
-	return ISOLATE_SUCCESS;
+	return (cc->nr_migratepages == 0) ? ISOLATE_NONE : ISOLATE_SUCCESS;
 }
 
 /*
-- 
1.7.3.2


--
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-12-31  8:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1325321208-15778-1-git-send-email-b32955@freescale.com \
    --to=b32955@freescale.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=shijie8@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).