From: Vlastimil Babka <vbabka@suse.cz>
To: Zhang Yanfei <zhangyanfei.ok@hotmail.com>,
Joonsoo Kim <js1304@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>,
David Rientjes <rientjes@google.com>,
Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [RFC PATCH v3 3/3] mm/compaction: enhance compaction finish condition
Date: Mon, 02 Feb 2015 15:19:41 +0100 [thread overview]
Message-ID: <54CF877D.9010609@suse.cz> (raw)
In-Reply-To: <BLU436-SMTP200D06EB86F21EF7A29CE57833C0@phx.gbl>
On 02/02/2015 02:51 PM, Zhang Yanfei wrote:
>> I've got another idea for small improvement. We should only test for fallbacks
>> when migration scanner has scanned (and migrated) a whole pageblock. Should be a
>> simple alignment test of cc->migrate_pfn.
>> Advantages:
>> - potentially less checking overhead
>> - chances of stealing increase if we created more free pages for migration
>> - thus less fragmentation
>> The cost is a bit more time spent compacting, but it's bounded and worth it
>> (especially the less fragmentation) IMHO.
>
> This seems to make the compaction a little compicated... I kind of
Just a little bit, compared to e.g. this patch :)
> don't know why there is more anti-fragmentation by using this approach.
Ah so let me explain. Assume we want to allocate order-3 unmovable page and have
to invoke compaction because of that. The migration scanner starts in the
beginning of a movable pageblock, isolates and migrates 32 pages
(COMPACT_CLUSTER_MAX) from the beginning sucessfully, and then we check in
compact_finished and see that the allocation could fall back to this newly
created order-5 block. So we terminate compaction and allocation takes this
order-5 block, allocates order-3 and the rest remains on free list of unmovable.
It will try to steal more freepages from the pageblock, but there aren't any. So
we have a movable block with unmovable pages. The spare free pages are
eventually depleted and we fallback to another movable pageblock... bad.
With the proposed change, we would try to compact the pageblock fully. Possibly
we would free at least half of it, so it would be marked as unmovable during the
fallback allocation, and would be able to satisfy more unmovable allocations
that wouldn't have to fallback somewhere else.
I don't think that finishing the scan of a single pageblock is that big of a
cost here.
--
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:[~2015-02-02 14:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 7:15 [RFC PATCH v3 1/3] mm/cma: change fallback behaviour for CMA freepage Joonsoo Kim
2015-02-02 7:15 ` [RFC PATCH v3 2/3] mm/page_alloc: factor out fallback freepage checking Joonsoo Kim
2015-02-02 9:59 ` Vlastimil Babka
2015-02-02 13:26 ` Joonsoo Kim
2015-02-02 12:56 ` Zhang Yanfei
2015-02-02 13:29 ` Joonsoo Kim
2015-02-02 7:15 ` [RFC PATCH v3 3/3] mm/compaction: enhance compaction finish condition Joonsoo Kim
2015-02-02 10:20 ` Vlastimil Babka
2015-02-02 13:23 ` Joonsoo Kim
2015-02-02 14:07 ` Vlastimil Babka
2015-02-02 13:51 ` Zhang Yanfei
2015-02-02 14:19 ` Vlastimil Babka [this message]
2015-02-03 6:55 ` Joonsoo Kim
2015-02-02 7:29 ` [RFC PATCH v3 1/3] mm/cma: change fallback behaviour for CMA freepage Joonsoo Kim
2015-02-02 8:27 ` 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=54CF877D.9010609@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=zhangyanfei.ok@hotmail.com \
--cc=zhangyanfei@cn.fujitsu.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).