summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-17 14:51:02 -0800
committerPraneeth Kumar Bajjuri <a0132704@ti.com>2011-09-19 13:03:18 -0700
commitbf98fa48ce806242decae7f5362d7a4284fa81fd (patch)
tree0ca79a2dd3cd2819b744b9a10a09660ced26ea92 /mm
parent8bec6d4e80a329f21350da5e89bb97b8f9f52016 (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6e8ecb6e021..41253539b32 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -176,6 +176,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;
@@ -1469,7 +1470,7 @@ static bool __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 false;