From owner-freebsd-current@FreeBSD.ORG Tue Sep 27 09:17:58 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA43716A41F for ; Tue, 27 Sep 2005 09:17:58 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id C226A43D48 for ; Tue, 27 Sep 2005 09:17:54 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail02.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j8R9HplH002616 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 27 Sep 2005 19:17:52 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id j8R9HoSR070651; Tue, 27 Sep 2005 19:17:51 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j8R9HnXS070650; Tue, 27 Sep 2005 19:17:49 +1000 (EST) (envelope-from pjeremy) Date: Tue, 27 Sep 2005 19:17:49 +1000 From: Peter Jeremy To: Kris Kennaway Message-ID: <20050927091749.GT40237@cirb503493.alcatel.com.au> References: <200509261847.35558@harrymail> <20050926174738.GA57284@xor.obsecurity.org> <43387811.1090308@freebsd.org> <20050926224453.GB39901@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050926224453.GB39901@xor.obsecurity.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org Subject: Re: 4BSD/ULE numbers... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 09:17:58 -0000 On Mon, 2005-Sep-26 18:44:53 -0400, Kris Kennaway wrote: >I'd love a way to measure sched_lock contention..I'm sure it's a >factor on e.g. my machines with >=10 CPUs, but mutex profiling doesn't >see it because it's a spinlock. How about adding a spincount field in struct mtx and incrementing it in the inner loop of _mtx_lock_spin()? This wouldn't be perfect but you could get a rough idea of the lock contention by looking at the rate that the spincount field incremented. Working out how many CPUs are simultaneously contending for sched_lock would be more difficult but doable. -- Peter Jeremy