Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2004 16:59:42 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
Cc:        current@freebsd.org
Subject:   Re: Panic with this morning's (~9am EDT, 15 jan 2004) sources.
Message-ID:  <200401161659.42394.jhb@FreeBSD.org>
In-Reply-To: <xzpr7xzsj20.fsf@dwp.des.no>
References:  <EE3D3FBAFFCAED448C21C398FDAD91AC0108D8@EBE1.gc.nat> <200401161523.32120.jhb@FreeBSD.org> <xzpr7xzsj20.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 16 January 2004 04:03 pm, Dag-Erling Sm=F8rgrav wrote:
> John Baldwin <jhb@FreeBSD.org> writes:
> > 	while (newfdp blah fdp) {
> > 		FILEDESC_UNLOCK(fdp);
> > 		FILEDESC_LOCK(newfdp);
> > 		fd_growtable(newfdp);
> > 		FILEDESC_UNLOCK(newfdp);
> > 		FILEDESC_LOCK(fdp);
> > 	}
>
> I guess...  seems like a bloody waste of cycles=20

You could only lock newfdp #ifdef INVARIANTS perhaps since that is the only=
=20
reason you are doing it.  That doesn't pessimize production kernels while=20
still letting your assertions work ok.  You could also perhaps tweak the=20
mtx_assert to somehow check the state of the fd pointer to see if it is a n=
ew=20
table (refcount of 0 or some such)

=2D-=20
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =3D  http://www.FreeBSD.org



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