diff options
author | Arve Hjønnevåg <arve@android.com> | 2009-02-17 14:51:02 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-09-29 17:49:04 -0700 |
commit | 8fa2a8933d517dfffa17596e990543fab4737020 (patch) | |
tree | 777a0a312b44f8e7b7859eff81768b052ae1ce48 /mm | |
parent | 49483c5c9e6fa3cb432d106cdfdc0b00b5ce0bb9 (diff) |
mm: Add min_free_order_shift tunable.
By default the kernel tries to keep half as much memory free at each
order as it does for one order below. This can be too agressive when
running without swap.
Change-Id: I5efc1a0b50f41ff3ac71e92d2efd175dedd54ead
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a8cfa9cc6e86..17ce3faeecca 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -166,6 +166,7 @@ static char * const zone_names[MAX_NR_ZONES] = { }; int min_free_kbytes = 1024; +int min_free_order_shift = 1; static unsigned long __meminitdata nr_kernel_pages; static unsigned long __meminitdata nr_all_pages; @@ -1477,7 +1478,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, free_pages -= z->free_area[o].nr_free << o; /* Require fewer higher order pages to be free */ - min >>= 1; + min >>= min_free_order_shift; if (free_pages <= min) return 0; |