[PATCH 14/17] vmscan: add scan_control.priority

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]