Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144655
b: refs/heads/master
c: 3a6be87
h: refs/heads/master
i:
  144653: 0931544
  144651: 958f0ca
  144647: ac4a91a
  144639: e2c767f
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed May 6, 2009
1 parent df6eab3 commit a9be8b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9155203a5de94278525647b16733f0c315f3b786
refs/heads/master: 3a6be87fd1e5cdbbc3b6a14d02a3efa9ecba1d3f
18 changes: 18 additions & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a9be8b7

Please sign in to comment.