From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 14 10:38:14 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 D978C16A402; Fri, 14 Apr 2006 10:38:14 +0000 (UTC) (envelope-from marco@goofy.tols.org) Received: from goofy.tols.org (goofy.demon.nl [83.160.134.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EE9643D45; Fri, 14 Apr 2006 10:38:13 +0000 (GMT) (envelope-from marco@goofy.tols.org) Received: from goofy.tols.org (localhost [127.0.0.1]) by goofy.tols.org (8.13.4/8.13.4) with ESMTP id k3EAcB8n018406; Fri, 14 Apr 2006 10:38:11 GMT (envelope-from marco@goofy.tols.org) Received: (from marco@localhost) by goofy.tols.org (8.13.4/8.13.4/Submit) id k3EAcAge018405; Fri, 14 Apr 2006 10:38:10 GMT (envelope-from marco) Date: Fri, 14 Apr 2006 10:38:10 +0000 From: Marco van Tol To: John Baldwin Message-ID: <20060414103810.GA18114@tols.org> References: <20060412215021.GB1146@tols.org> <200604131020.42417.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604131020.42417.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV 0.88.1/1398/Fri Apr 14 09:03:44 2006 on goofy.tols.org X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on goofy.tols.org X-Mailman-Approved-At: Fri, 14 Apr 2006 11:41:52 +0000 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: Fri, 14 Apr 2006 10:38:14 -0000 On Thu, Apr 13, 2006 at 10:20:40AM -0400, John Baldwin wrote: > On Wednesday 12 April 2006 17:50, Marco van Tol wrote: > > Hi there, > > > > My apologies if this is the wrong list to ask this kind of question. > > I would appreciate a pointer to the correct list if it is please. :) > > > > I noticed in the code for gkrellm /usr/ports/sysutils/gkrellm2 that SMP > > per-cpu statistics were not yet supported under FreeBSD, and decided to > > check whether I could add that. (I'm running a (dual-core) Athlon64 X2 > > with FreeBSD 6.1-PRERELEASE) > > I can't find sample code and/or documentation on how to acquire that > > information from the kernel. [...] > > Is there an interface under FreeBSD to acquire the necessary per-cpu > > statistics? > > They don't exist currently. I have a patch to make the stats per-CPU > for performance reasons (though it only helps out on systems with lots > of CPUs (like 10) and hurts on systems with fewer CPUs (like 4)). It > doesn't include a sysctl to get the per-CPU stats, but I could add one. OK, that I could use to get started on the code for adding per-CPU stats to gkrellm under FreeBSD. Is the patch against FreeBSD CURRENT? Then if the per-CPU stats code hits the STABLE trunk, it's likely to be only a few changes to what I did perhaps. Or am I running a bit to far ahead here? :) Is the patch in available your home area on www.freebsd.org? Thanks! Marco -- A male gynecologist is like an auto mechanic who never owned a car. - Carrie Snow