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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/