Re: page allocator regression on nommu
From: Mel Gorman
Date: Mon Aug 31 2009 - 06:31:02 EST
On Mon, Aug 31, 2009 at 04:48:43PM +0900, Paul Mundt wrote:
> Hi Mel,
>
> It seems we've managed to trigger a fairly interesting conflict between
> the anti-fragmentation disabling code and the nommu region rbtree. I've
> bisected it down to:
>
> commit 49255c619fbd482d704289b5eb2795f8e3b7ff2e
> Author: Mel Gorman <mel@xxxxxxxxx>
> Date: Tue Jun 16 15:31:58 2009 -0700
>
> page allocator: move check for disabled anti-fragmentation out of fastpath
>
> On low-memory systems, anti-fragmentation gets disabled as there is
> nothing it can do and it would just incur overhead shuffling pages between
> lists constantly. Currently the check is made in the free page fast path
> for every page. This patch moves it to a slow path. On machines with low
> memory, there will be small amount of additional overhead as pages get
> shuffled between lists but it should quickly settle.
>
> which causes death on unpacking initramfs on my nommu board. With this
> reverted, everything works as expected. Note that this blows up with all of
> SLOB/SLUB/SLAB.
>
> I'll continue debugging it, and can post my .config if it will be helpful, but
> hopefully you have some suggestions on what to try :-)
>
Based on the output you have given me, it would appear the real
underlying cause is that fragmentation caused the allocation to fail.
The following patch might fix the problem.
====
page-allocator: Always change pageblock ownership when anti-fragmentation is disabled
On low-memory systems, anti-fragmentation gets disabled as there is nothing
it can do and it would just incur overhead shuffling pages between lists
constantly. When the system starts up, there is a period of time when
all the pageblocks are marked MOVABLE and the expectation is that they
get marked UNMOVABLE.
However, when MAX_ORDER is a large number, the pageblocks may not change
ownership because the normal criteria do not apply. This can have the
effect of prematurely breaking up too many large contiguous blocks which
can be a problem on NOMMU systems.
This patch causes pageblocks to change ownership ever time a fallback
occurs when anti-fragmentation is disabled. This should prevent the
large blocks being prematurely broken up.
Signed-off-by: Mel Gorman <mel@xxxxxxxxx>
---
mm/page_alloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d052abb..cfe9a5b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -817,7 +817,8 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
* agressive about taking ownership of free pages
*/
if (unlikely(current_order >= (pageblock_order >> 1)) ||
- start_migratetype == MIGRATE_RECLAIMABLE) {
+ start_migratetype == MIGRATE_RECLAIMABLE ||
+ page_group_by_mobility_disabled) {
unsigned long pages;
pages = move_freepages_block(zone, page,
start_migratetype);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/