From a9be8b7901db2fd86cb4143c552ae31cd879e3bb Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 6 May 2009 16:03:03 -0700 Subject: [PATCH] --- yaml --- r: 144655 b: refs/heads/master c: 3a6be87fd1e5cdbbc3b6a14d02a3efa9ecba1d3f h: refs/heads/master i: 144653: 0931544a60171481072b27d7893f0291cd9da1bf 144651: 958f0ca881d80a8cf9e7b2d702f13fcda50f5d50 144647: ac4a91acbc71c3ce6655fb4774a5b3beb2b5f404 144639: e2c767faacf047e614f9d3e627ecc2a79983f15b v: v3 --- [refs] | 2 +- trunk/mm/page_alloc.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 95b69307e997..5da5f19d3f23 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9155203a5de94278525647b16733f0c315f3b786 +refs/heads/master: 3a6be87fd1e5cdbbc3b6a14d02a3efa9ecba1d3f diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index 8add7daf98b0..fe753ecf2aa5 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -2681,6 +2681,7 @@ static void __meminit zone_init_free_lists(struct zone *zone) static int zone_batchsize(struct zone *zone) { +#ifdef CONFIG_MMU int batch; /* @@ -2709,6 +2710,23 @@ static int zone_batchsize(struct zone *zone) batch = rounddown_pow_of_two(batch + batch/2) - 1; return batch; + +#else + /* The deferral and batching of frees should be suppressed under NOMMU + * conditions. + * + * The problem is that NOMMU needs to be able to allocate large chunks + * of contiguous memory as there's no hardware page translation to + * assemble apparent contiguous memory from discontiguous pages. + * + * Queueing large contiguous runs of pages for batching, however, + * causes the pages to actually be freed in smaller chunks. As there + * can be a significant delay between the individual batches being + * recycled, this leads to the once large chunks of space being + * fragmented and becoming unavailable for high-order allocations. + */ + return 0; +#endif } static void setup_pageset(struct per_cpu_pageset *p, unsigned long batch)