Panic with this morning's (~9am EDT, 15 jan 2004) sources.
John Baldwin
jhb at FreeBSD.org
Fri Jan 16 14:00:20 PST 2004
On Friday 16 January 2004 04:03 pm, Dag-Erling Smørgrav wrote:
> John Baldwin <jhb at 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
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. 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)
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-current
mailing list