Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 1999 06:38:25 -0700
From:      Kirk McKusick <mckusick@flamingo.McKusick.COM>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Alan Cox <alc@cs.rice.edu>, Julian Elischer <julian@whistle.com>, Mike Smith <mike@smith.net.au>, Peter Wemm <peter@freebsd.org>, "John S. Dyson" <toor@dyson.iquest.net>, dg@root.com, dyson@iquest.net, current@freebsd.org, Greg Lehey <grog@lemis.com>
Subject:   Re: Found the startup panic - ccd ( patch included ) 
Message-ID:  <199906281338.GAA02414@flamingo.McKusick.COM>
In-Reply-To: Your message of "Mon, 28 Jun 1999 01:28:29 PDT." <199906280828.BAA18365@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
You are proposing replacing the current buffer locks with two separate
locks, one for ownership and the other for I/O. Frankly, I do not find 
this simpler or easier to understand than what we have now. I also
take some issue with the cost of the lockmgr code. It is large, but
the critical paths through it are pretty short (it was derived from
the MACH lock code which had been pretty well tuned). There is some
long and hairy stuff in there like draining locks. But if you intend
to have locks in malloced memory, you must have a way to ensure that
all references go away before you deallocate it. And while long and
nasty, that code is (hopefully) not executed terribly frequently.
I will also note that adding the surrounding splbio/splx to all the
BUF_ macros nearly doubled the cycle count on those functions. As
nearly every instance is already splbio protected (since the B_BUSY
and B_WANTED code also required protection to avoid races), it would
make a big performance improvement to just go make sure that all the
BUF_ calls are already protected rather than needlessly add those splbio
and splx calls.

	Kirk


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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