From: Vlastimil Babka <vbabka@suse.cz>
To: Heesub Shin <heesub.shin@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mel Gorman <mgorman@suse.de>, Dongjun Shin <d.j.shin@samsung.com>,
Sunghwan Yun <sunghwan.yun@samsung.com>
Subject: Re: [PATCH 2/2] mm/compaction: fix to initialize free scanner properly
Date: Mon, 07 Apr 2014 16:46:12 +0200 [thread overview]
Message-ID: <5342BA34.8050006@suse.cz> (raw)
In-Reply-To: <1396515424-18794-2-git-send-email-heesub.shin@samsung.com>
On 04/03/2014 10:57 AM, Heesub Shin wrote:
> 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.
Hm good catch. I think that the same problem can happen (at least
theoretically) through zone->compact_cached_free_pfn with
CONFIG_HOLES_IN_ZONE enabled. Then compact_cached_free_pfn could be set
to a non-aligned-to-pageblock pfn and spoil scans. I'll send a patch
that solves it on isolate_freepages() level, which allows further
simplification of the function.
Vlastimil
> 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;
> }
>
--
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>
next prev parent reply other threads:[~2014-04-07 14:46 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 ` [PATCH 2/2] mm/compaction: fix to initialize free scanner properly Heesub Shin
2014-04-07 14:46 ` Vlastimil Babka [this message]
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=5342BA34.8050006@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=d.j.shin@samsung.com \
--cc=heesub.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).