summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-17 14:51:02 -0800
committerArve Hjønnevåg <arve@android.com>2010-02-03 20:48:13 -0800
commitc177d04116de6acff4d41706df54cf6c909aa5a2 (patch)
treeacf20a7a8a150393814a99014e18b5041aae04ab /mm
parent7725dd9abd08371ccab1025e5b7b77bd5a206e73 (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. 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 2bc2ac63f41e..70d43bf00dc6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -122,6 +122,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;
@@ -1379,7 +1380,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;