From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 24 12:41:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D8B416A401 for ; Mon, 24 Apr 2006 12:41:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3044343D5C for ; Mon, 24 Apr 2006 12:41:11 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k3OCf5Qx052454; Mon, 24 Apr 2006 08:41:06 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marco van Tol Date: Mon, 24 Apr 2006 08:23:48 -0400 User-Agent: KMail/1.8.3 References: <20060412215021.GB1146@tols.org> <20060420224049.GA99399@tols.org> <20060423113335.GA27406@tols.org> In-Reply-To: <20060423113335.GA27406@tols.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200604240823.48948.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1423/Mon Apr 24 04:24:11 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: Per CPU cpu-statistics under SMP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Apr 2006 12:41:13 -0000 On Sunday 23 April 2006 07:33 am, Marco van Tol wrote: > On Fri, Apr 21, 2006 at 12:40:49AM +0200, Marco van Tol wrote: > > On Wed, Apr 19, 2006 at 07:26:27AM +0000, Marco van Tol wrote: > > > On Tue, Apr 18, 2006 at 06:38:26PM -0400, John Baldwin wrote: > > > > [...] > > > > > > Ah, hmm. On 6.x we don't have per-thread stat ticks yet, which is > > > > probably why it is failing. It also isn't safe to move sched_lock > > > > down either on 6.x. You can still apply the rest of the patch by > > > > hand, just leave the 'mtx_lock_spin(&sched_lock)' where it is and > > > > change all the 'cp_time[FOO]++' to 'PCPU_LAZY_INC(cp_time[FOO])'. > > > > > > OK, thanks. > > > > > > What I will do is replace my gentoo partition with a BSD current > > > partition so I don't loose my workstation as it were, and use that to > > > work on this. > > > > > > Will let you know how that goes. Thanks. > > > > Ha! It succeeded. :) > > [...] > > I got it to work in non-client/server mode, and am working on making it > also work in client/server mode. (gkrellmd as opposed to gkrellm) > > Is there anything you can say regarding an estimate on when per-cpu > specific stats will hit the official CURRENT and STABLE branches? > > Are you interested in what I did to gkrellm so far? All that was necessa= ry > was a small patch to src/sysdeps/freebsd.c in the gkrellm tree as far as > making it work with your patch was concerned. I can send the patch to yo= ur > email adres, or make it available on my website. :) > > Marco Well, the goal of the patch was to provide a small performance optimization= by=20 holding sched_lock for a shorter period of time. Curiously, it actually=20 resulted in a performance decrease on i386 and amd64 in benchmarks. On a 1= 0=20 cpu sparc64 machine it did result in an improvement. I need to do more=20 research to determine why it would hurt performance for the x86 case (even = on=20 4 cpu boxes) as I don't want to go committing things that hurt performance.= =20 If I can address the performance problems though this is the interface that= =20 would be presented to userland. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org