From owner-freebsd-current Mon Feb 18 12:20:35 2002 Delivered-To: freebsd-current@freebsd.org Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by hub.freebsd.org (Postfix) with ESMTP id 0C67637B427; Mon, 18 Feb 2002 12:20:27 -0800 (PST) Received: (from jake@localhost) by k6.locore.ca (8.11.6/8.11.6) id g1IKc7j00373; Mon, 18 Feb 2002 15:38:07 -0500 (EST) (envelope-from jake) Date: Mon, 18 Feb 2002 15:38:07 -0500 From: Jake Burkholder To: Matthew Dillon Cc: "David O'Brien" , current@FreeBSD.ORG Subject: Re: Patch to improve mutex collision performance Message-ID: <20020218153807.E96115@locore.ca> References: <200202181912.g1IJCGK32122@apollo.backplane.com> <20020218114326.A98974@dragon.nuxi.com> <200202181951.g1IJpip33604@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202181951.g1IJpip33604@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Feb 18, 2002 at 11:51:44AM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Mon, Feb 18, 2002 at 11:51:44AM -0800, Matthew Dillon said words to the effect of; > > :I request that you give say a 3 day review period for this. > :I know JHB still has limited email access (no DSL yet). > :This may be something he should review. I second this request. > > Sigh. Are you intending to ask me to have JHB review every single change > I make to -current? For changes to the mutex code, yes. > Because if you are the answer is: "Are you out of > your mind?". Sigh. > > I'm fairly sure JHB does not have a patch to address this but, please, > be my guest and check P4. Actually he does. Maybe you should have checked p4 first yourself. What John's patch does is spin while the lock owner is running on another cpu. Spinning while there are no other processes on the run queues as well makes sense but you'll also be doing a lot of acquires and releases of sched_lock. The only thing that jumped out at me looking at the patch is that critnest cannot be 0 here because the sched_lock is held; holding a spin lock implies being in a critical section. I need to think about this more and would like you to wait until John has a chance to look at it as well. Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message