Nick Piggin wrote:
diff -puN mm/vmscan.c~vm-fix mm/vmscan.c
--- linux-2.6/mm/vmscan.c~vm-fix 2004-10-17 11:14:02.000000000 +1000
+++ linux-2.6-npiggin/mm/vmscan.c 2004-10-17 11:20:55.000000000 +1000
@@ -181,7 +181,7 @@ static int shrink_slab(unsigned long sca
struct shrinker *shrinker;
if (scanned == 0)
- return 0;
+ scanned = 1;
if (!down_read_trylock(&shrinker_rwsem))
return 0;
@@ -1065,7 +1065,8 @@ scan:
total_reclaimed += sc.nr_reclaimed;
if (zone->all_unreclaimable)
continue;
- if (zone->pages_scanned > zone->present_pages * 2)
+ if (zone->pages_scanned > (zone->nr_active +
+ zone->nr_inactive) * 4)
zone->all_unreclaimable = 1;
/*
* If we've done a decent amount of scanning and
Nope, this patch does not fix the hang.