From owner-cvs-all Thu Dec 14 8:37:52 2000 From owner-cvs-all@FreeBSD.ORG Thu Dec 14 08:37:48 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id BC0E037B402; Thu, 14 Dec 2000 08:37:48 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eBEGbaH04556; Thu, 14 Dec 2000 08:37:36 -0800 (PST) Date: Thu, 14 Dec 2000 08:37:36 -0800 From: Alfred Perlstein To: Seigo Tanimura Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, jhb@FreeBSD.org, cp@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_vfsops.c Message-ID: <20001214083736.M16205@fw.wintelcom.net> References: <200012131003.eBDA3rh34394@freefall.freebsd.org> <20001213024954.B16205@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from tanimura@r.dl.itc.u-tokyo.ac.jp on Thu, Dec 14, 2000 at 04:58:20PM +0900 Sender: bright@fw.wintelcom.net Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Seigo Tanimura [001213 23:58] wrote: > On Thu, 14 Dec 2000 15:34:20 +0900, > Seigo Tanimura said: > > > Seigo> Thus it should be even better to enter to and exit from the ufs hash > Seigo> mutex in the functions shown above. > > And the result was no go. The problems were > > o sleeping with holding a lock (for mutex), and This should be ok. We sleep with the lock held anyway when we call MALLOC with M_WAITOK. > o recursion of lock (for simplelock). Mutexes can handle recursion. > lockmgr is likely to solve both of the problems, but I am not sure if > it is worth trying. Probably not. Did you just panic because you slept with the lock? Or did you deadlock? If you panic'd because of WITNESS you can try adding the name of the lock to: static char *sleep_list[] = { "Giant", NULL }; in kern/kern_mutex.c -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message