Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582497

Re: [PATCH v2 08/10] mm, compaction: finish whole pageblock to reduce fragmentation

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 08/10] mm, compaction: finish whole pageblock to reduce fragmentation
Date 2017-02-16 12:50 +0100
Message-ID <tbsJs-5E4-9@gated-at.bofh.it> (permalink)
References <t9nXA-6ZO-5@gated-at.bofh.it> <t9nXA-6ZO-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 10, 2017 at 06:23:41PM +0100, Vlastimil Babka wrote:
> The main goal of direct compaction is to form a high-order page for allocation,
> but it should also help against long-term fragmentation when possible. Most
> lower-than-pageblock-order compactions are for non-movable allocations, which
> means that if we compact in a movable pageblock and terminate as soon as we
> create the high-order page, it's unlikely that the fallback heuristics will
> claim the whole block. Instead there might be a single unmovable page in a
> pageblock full of movable pages, and the next unmovable allocation might pick
> another pageblock and increase long-term fragmentation.
> 
> To help against such scenarios, this patch changes the termination criteria for
> compaction so that the current pageblock is finished even though the high-order
> page already exists. Note that it might be possible that the high-order page
> formed elsewhere in the zone due to parallel activity, but this patch doesn't
> try to detect that.
> 
> This is only done with sync compaction, because async compaction is limited to
> pageblock of the same migratetype, where it cannot result in a migratetype
> fallback. (Async compaction also eagerly skips order-aligned blocks where
> isolation fails, which is against the goal of migrating away as much of the
> pageblock as possible.)
> 
> As a result of this patch, long-term memory fragmentation should be reduced.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 08/10] mm, compaction: finish whole pageblock to  reduce fragmentation Johannes Weiner <hannes@cmpxchg.org> - 2017-02-16 12:50 +0100

csiph-web