From owner-freebsd-current Mon Feb 18 12:43:23 2002 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 0E6C437B400; Mon, 18 Feb 2002 12:43:20 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1IKhIc36298; Mon, 18 Feb 2002 12:43:18 -0800 (PST) (envelope-from dillon) Date: Mon, 18 Feb 2002 12:43:18 -0800 (PST) From: Matthew Dillon Message-Id: <200202182043.g1IKhIc36298@apollo.backplane.com> To: Jake Burkholder Cc: "David O'Brien" , current@FreeBSD.ORG Subject: Re: Patch to improve mutex collision performance References: <200202181912.g1IJCGK32122@apollo.backplane.com> <20020218114326.A98974@dragon.nuxi.com> <200202181951.g1IJpip33604@apollo.backplane.com> <20020218153807.E96115@locore.ca> 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 :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 Sure thing. Ah, critnest... you are right. I should be checking for critnest > 1. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message