svn commit: r238907 - projects/calloutng/sys/kern

Konstantin Belousov kostikbel at gmail.com
Sun Sep 9 19:09:48 UTC 2012


On Sun, Sep 09, 2012 at 04:03:14PM +0100, Attilio Rao wrote:
> On 8/2/12, Attilio Rao <attilio at freebsd.org> wrote:
> > On 7/30/12, John Baldwin <jhb at freebsd.org> wrote:
> 
> [ trimm ]
> 
> >> --- //depot/projects/smpng/sys/kern/subr_turnstile.c	2012-06-04
> >> 18:27:32.000000000 0000
> >> +++ //depot/user/jhb/lock/kern/subr_turnstile.c	2012-06-05
> >> 00:27:57.000000000 0000
> >> @@ -684,6 +684,7 @@
> >>  	if (owner)
> >>  		MPASS(owner->td_proc->p_magic == P_MAGIC);
> >>  	MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
> >> +	KASSERT(!TD_IS_IDLETHREAD(td), ("idle threads cannot block on locks"));
> >>
> >>  	/*
> >>  	 * If the lock does not already have a turnstile, use this thread's
> >
> > I'm wondering if we should also use similar checks in places doing
> > adaptive spinning (including the TD_NO_SLEEPING check). Likely yes.
> 
> So what do you think about this?
My 2 cents are that is would be useful both to show the kind of lock
(mutex/rw/sx/lockmgr etc) as well as the lock name. Ideally, the offending
lock address would be also printed, because our kgdb dwarf parser does not
work much more often then it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20120909/81010460/attachment.pgp


More information about the svn-src-projects mailing list