From owner-freebsd-stable Tue Jan 8 13: 7:17 2002 Delivered-To: freebsd-stable@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 3F40237B402; Tue, 8 Jan 2002 13:07:12 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id g08L4pU09836; Tue, 8 Jan 2002 22:04:51 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Michael Smith Cc: Dan Moschuk , "M. Warner Losh" , stable@FreeBSD.ORG Subject: Re: Hang in md driver In-Reply-To: Your message of "Tue, 08 Jan 2002 13:05:13 PST." <200201082105.g08L5D001648@mass.dis.org> Date: Tue, 08 Jan 2002 22:04:51 +0100 Message-ID: <9834.1010523891@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200201082105.g08L5D001648@mass.dis.org>, Michael Smith writes: >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. Sounds like a great Junior Kernel Hacker task to me :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message