Re: Panic with this morning's (~9am EDT, 15 jan 2004) sources.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 16 Jan 2004 17:26:02 -0500
On Friday 16 January 2004 05:01 pm, Dag-Erling Smørgrav wrote:
> John Baldwin <jhb_at_FreeBSD.org> writes:
> > You could only lock newfdp #ifdef INVARIANTS perhaps since that is the
> > only reason you are doing it.  That doesn't pessimize production kernels
> > while still letting your assertions work ok.
>
> now that's an idea (though it's a bit of a hack)
>
> >                                         You could also perhaps tweak the
> > mtx_assert to somehow check the state of the fd pointer to see if it is a
> > new table (refcount of 0 or some such)
>
> that would pessimize the common case...

Well, only for kernels with INVARIANTS in them. :)  If you do 'if (foo) 
mtx_assert(...)' then gcc should optimize the whole thing out without 
invariants.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Fri Jan 16 2004 - 13:33:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:38 UTC