Try the enclosed patch (against 2.1.46), and tell me if it helps.
Kevin <buhr@stat.wisc.edu>
* * *
diff -u -r1.1.1.1 vmscan.c
--- linux/mm/vmscan.c 1997/07/17 17:45:07 1.1.1.1
+++ linux/mm/vmscan.c 1997/07/24 17:16:22
@@ -351,6 +351,8 @@
int i=6;
int stop;
+ shrink_dcache(); /* only try this once */
+
/* we don't try as hard if we're not waiting.. */
stop = 3;
if (wait)
@@ -360,18 +362,12 @@
case 0:
if (shrink_mmap(i, dma))
return 1;
- state = 1;
- case 1:
- shrink_dcache();
state = 2;
+ /* case 1:
+ shrink_dcache();
+ state = 2; */
case 2:
- /*
- * We shouldn't have a priority here:
- * If we're low on memory we should
- * unconditionally throw away _all_
- * kmalloc caches!
- */
- if (kmem_cache_reap(0, dma, wait))
+ if (kmem_cache_reap(i, dma, wait))
return 1;
state = 3;
case 3: