Messages in this thread Patch in this message | | | Subject | Re: fork: out of memory | From | (Kevin Buhr) | Date | 25 Jul 1997 12:46:46 -0500 |
| |
Pavel Machek <pavel@Elf.mj.gts.cz> writes: > > Seems to me that newer kernel (2.1.46) have bad problems with above > error... Is someone else experiencing this? It is bad when running cvs > (in way export CVSROOT=localhost:/...), cvs can not fork sometimes and > it is _bad_.
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:
| |