Date: Tue, 08 Jan 2002 13:05:13 -0800 From: Michael Smith <msmith@freebsd.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Dan Moschuk <dan@FreeBSD.ORG>, "M. Warner Losh" <imp@village.org>, msmith@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Hang in md driver Message-ID: <200201082105.g08L5D001648@mass.dis.org> In-Reply-To: Your message of "Tue, 08 Jan 2002 21:50:00 %2B0100." <9566.1010523000@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> In message <20020108142747.G3163@spirit.jaded.net>, Dan Moschuk writes: > > > >| >In message: <200201072026.g07KQUX01267@mass.dis.org> > >| > Michael Smith <msmith@FreeBSD.ORG> writes: > >| >: This doesn't seem to address the problem; md(4) shouldn't hang when it > >| >: runs out of memory. > >| > > >| >We have systems that hange 1 time in 10 when booting when trying to > >| >mount the mfs stuff... :-( > >| > >| Well, there is no malloc_quota_used(9), so I can't do anything about it. > > > >What would be involved in writing one? Work has me pretty busy, but I'd > >like to take a stab at it. > > I have no idea, sorry... This wouldn't do it. You really want to add an M_SHORTWAIT flag, and in kern/kern_malloc.c around line 162 (in -current anyway) pass a timeout to msleep. If the timeout expires, return NULL. The wait should be perhaps 1 second at most. This would be simple to add to both -stable and -current, and since it doesn't change the behaviour of M_WAITOK, would not have any deleterious sideeffects. You could then work your way through the M_WAITOK consumers, teaching the relevant ones how to deal with resource starvation other than by deadlocking. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201082105.g08L5D001648>