From owner-freebsd-current Mon Jun 28 10:56:51 1999 Delivered-To: freebsd-current@freebsd.org Received: from flamingo.McKusick.COM (flamingo.mckusick.com [209.31.233.178]) by hub.freebsd.org (Postfix) with ESMTP id 5776F15483; Mon, 28 Jun 1999 10:56:47 -0700 (PDT) (envelope-from mckusick@flamingo.McKusick.COM) Received: from flamingo.McKusick.COM (mckusick@localhost.concentric.net [127.0.0.1]) by flamingo.McKusick.COM (8.9.3/8.9.0) with ESMTP id GAA02414; Mon, 28 Jun 1999 06:38:33 -0700 (PDT) Message-Id: <199906281338.GAA02414@flamingo.McKusick.COM> To: Matthew Dillon Subject: Re: Found the startup panic - ccd ( patch included ) Cc: Alan Cox , Julian Elischer , Mike Smith , Peter Wemm , "John S. Dyson" , dg@root.com, dyson@iquest.net, current@freebsd.org, Greg Lehey In-reply-to: Your message of "Mon, 28 Jun 1999 01:28:29 PDT." <199906280828.BAA18365@apollo.backplane.com> Date: Mon, 28 Jun 1999 06:38:25 -0700 From: Kirk McKusick Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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