linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heesub Shin <heesub.shin@samsung.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Mel Gorman <mgorman@suse.de>,
	Heesub Shin <heesub.shin@samsung.com>,
	Dongjun Shin <d.j.shin@samsung.com>,
	Sunghwan Yun <sunghwan.yun@samsung.com>
Subject: [PATCH 2/2] mm/compaction: fix to initialize free scanner properly
Date: Thu, 03 Apr 2014 17:57:04 +0900	[thread overview]
Message-ID: <1396515424-18794-2-git-send-email-heesub.shin@samsung.com> (raw)
In-Reply-To: <1396515424-18794-1-git-send-email-heesub.shin@samsung.com>

Free scanner does not works well on systems having zones which do not
span to pageblock-aligned boundary.

zone->compact_cached_free_pfn is reset when the migration and free
scanner across or compaction restarts. After the reset, if end_pfn of
the zone was not aligned to pageblock_nr_pages, free scanner tries to
isolate free pages from the middle of pageblock to the end, which can
be very small range.

Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
Cc: Dongjun Shin <d.j.shin@samsung.com>
Cc: Sunghwan Yun <sunghwan.yun@samsung.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 1ef9144..fefe1da 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -983,7 +983,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
 	 */
 	cc->migrate_pfn = zone->compact_cached_migrate_pfn;
 	cc->free_pfn = zone->compact_cached_free_pfn;
-	if (cc->free_pfn < start_pfn || cc->free_pfn > end_pfn) {
+	if (cc->free_pfn < start_pfn || cc->free_pfn >= end_pfn) {
 		cc->free_pfn = end_pfn & ~(pageblock_nr_pages-1);
 		zone->compact_cached_free_pfn = cc->free_pfn;
 	}
-- 
1.8.3.2


  reply	other threads:[~2014-04-03  8:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03  8:57 [PATCH 1/2] mm/compaction: clean up unused code lines Heesub Shin
2014-04-03  8:57 ` Heesub Shin [this message]
2014-04-07 14:46   ` [PATCH 2/2] mm/compaction: fix to initialize free scanner properly Vlastimil Babka
2014-04-15  9:18     ` [PATCH 1/2] mm/compaction: make isolate_freepages start at pageblock boundary Vlastimil Babka
2014-04-15  9:18       ` [PATCH 2/2] mm/compaction: cleanup isolate_freepages() Vlastimil Babka
2014-04-16  1:53         ` Joonsoo Kim
2014-04-16 15:49         ` Rik van Riel
2014-04-17  0:07         ` Minchan Kim
2014-04-21 19:41           ` Andrew Morton
2014-04-21 21:43             ` Vlastimil Babka
2014-04-21 23:53               ` Minchan Kim
2014-04-22  6:33                 ` Vlastimil Babka
2014-04-22  6:52                   ` Minchan Kim
2014-04-22 13:17                     ` Vlastimil Babka
2014-04-23  2:58                       ` Joonsoo Kim
2014-04-23  7:30                         ` Vlastimil Babka
2014-04-23 13:54                           ` Joonsoo Kim
2014-04-23 14:31                             ` Vlastimil Babka
2014-04-25  8:29                               ` Joonsoo Kim
2014-04-29  8:40                                 ` Vlastimil Babka
2014-05-01  1:58                                 ` Michal Nazarewicz
2014-04-16  1:52       ` [PATCH 1/2] mm/compaction: make isolate_freepages start at pageblock boundary Joonsoo Kim
2014-04-16 15:47       ` Rik van Riel
2014-04-16 23:43       ` Minchan Kim
2014-04-07 14:40 ` [PATCH 1/2] mm/compaction: clean up unused code lines Vlastimil Babka

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=1396515424-18794-2-git-send-email-heesub.shin@samsung.com \
    --to=heesub.shin@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=d.j.shin@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=sunghwan.yun@samsung.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).