Re: Hang on x86-64, 2.6.9-rc3-bk4

From: Nick Piggin
Date: Sat Oct 16 2004 - 21:22:54 EST


Jeff Garzik wrote:
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.


Arrgh, sorry that should be
if (zone->pages_scanned *>=* blah)

If you've got zero LRU pages, both sides of this should be zero, and
we *want* all_unreclaimable to be set.
-
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/