[PATCH 14/17] vmscan: add scan_control.priority
From: Wu Fengguang
Date: Sun Sep 12 2010 - 11:56:16 EST
It seems most vmscan functions need the priority parameter.
It will simplify code to put it into scan_control.
It will be referenced in the next patch. This patch could convert
the many exising functnions, but let's keep it simple at first.
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
mm/vmscan.c | 4 ++++
1 file changed, 4 insertions(+)
--- linux-next.orig/mm/vmscan.c 2010-09-10 13:13:41.000000000 +0800
+++ linux-next/mm/vmscan.c 2010-09-10 13:17:01.000000000 +0800
@@ -78,6 +78,8 @@ struct scan_control {
int order;
+ int priority;
+
/*
* Intend to reclaim enough continuous memory rather than reclaim
* enough amount of memory. i.e, mode for high order allocation.
@@ -1875,6 +1877,7 @@ static unsigned long do_try_to_free_page
for (priority = DEF_PRIORITY; priority >= 0; priority--) {
sc->nr_scanned = 0;
+ sc->priority = priority;
if (!priority)
disable_swap_token();
all_unreclaimable = shrink_zones(priority, zonelist, sc);
@@ -2127,6 +2130,7 @@ loop_again:
disable_swap_token();
all_zones_ok = 1;
+ sc.priority = priority;
/*
* Scan in the highmem->dma direction for the highest
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/