summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-17 14:51:02 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:37:50 -0800
commita841be8af78880e00c8ae57f8440b67a1d128365 (patch)
tree4031c4abc43038ff28f19cb1c81da489e4db1f84 /mm/page_alloc.c
parentfe6c31c6f60272e8eda705fdc4428c3b5f06dbc5 (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/page_alloc.c')
-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 6e8ecb6e021c..41253539b32a 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;