Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2000 08:37:36 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
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>
In-Reply-To: <vmzohz77tv.wl@rina.r.dl.itc.u-tokyo.ac.jp>; from tanimura@r.dl.itc.u-tokyo.ac.jp on Thu, Dec 14, 2000 at 04:58:20PM %2B0900
References:  <200012131003.eBDA3rh34394@freefall.freebsd.org> <20001213024954.B16205@fw.wintelcom.net> <vm4s088s2l.wl@rina.r.dl.itc.u-tokyo.ac.jp> <vm1yvb8qab.wl@rina.r.dl.itc.u-tokyo.ac.jp> <vmzohz77tv.wl@rina.r.dl.itc.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
* Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> [001213 23:58] wrote:
> On Thu, 14 Dec 2000 15:34:20 +0900,
>   Seigo Tanimura <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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001214083736.M16205>