diff options
author | Arve Hjønnevåg <arve@android.com> | 2009-02-17 14:51:02 -0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-21 22:34:37 -0500 |
commit | 06b214cfc226688645784002178b2e6a42574053 (patch) | |
tree | c5e1c15820cd9e1fd69c7ef0a8d9ff6264b6099c /mm | |
parent | 6e48150723acbc04e4b53542e1c29ff6684cb731 (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 2ee0fd313f03..63858c4522b3 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -197,6 +197,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; @@ -1648,7 +1649,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; |