lkml.org 
[lkml]   [1997]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: fork: out of memory
From
Date
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:
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.048 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site