Re: vmscan: Do not run shrinkers for zones other than ZONE_NORMAL

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

 



Potential fixup....



Allocations to ZONE_NORMAL may fall back to ZONE_DMA and ZONE_DMA32
so we must allow calling shrinkers for these zones as well.

Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>

---
 mm/vmscan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c	2010-10-21 13:23:32.000000000 -0500
+++ linux-2.6/mm/vmscan.c	2010-10-21 13:23:53.000000000 -0500
@@ -2219,7 +2219,7 @@ loop_again:
 					8*high_wmark_pages(zone), end_zone, 0))
 				shrink_zone(priority, zone, &sc);

-			if (zone_idx(zone) == ZONE_NORMAL) {
+			if (zone_idx(zone) <= ZONE_NORMAL) {
 				reclaim_state->reclaimed_slab = 0;
 				nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL,
 							lru_pages);
@@ -2704,7 +2704,7 @@ static int __zone_reclaim(struct zone *z

 	nr_slab_pages0 = zone_page_state(zone, NR_SLAB_RECLAIMABLE);
 	if (nr_slab_pages0 > zone->min_slab_pages &&
-					zone_idx(zone) == ZONE_NORMAL) {
+					zone_idx(zone) <= ZONE_NORMAL) {
 		/*
 		 * shrink_slab() does not currently allow us to determine how
 		 * many pages were freed in this zone. So we take the current

--
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]