From owner-freebsd-smp Thu Feb 6 8:13:11 2003 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07B0337B401 for ; Thu, 6 Feb 2003 08:13:10 -0800 (PST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7564F43FA3 for ; Thu, 6 Feb 2003 08:13:09 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 17260 invoked from network); 6 Feb 2003 16:13:12 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Feb 2003 16:13:12 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h16GD7UT000925; Thu, 6 Feb 2003 11:13:07 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3E420FBA.90504@sharma-home.net> Date: Thu, 06 Feb 2003 11:13:15 -0500 (EST) From: John Baldwin To: Arun Sharma Subject: Re: kern/18524: The current kernel doesn't keep stats on a per c Cc: smp@freebsd.org, freebsd-gnats-submit@FreeBSD.org Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 06-Feb-2003 Arun Sharma wrote: > > I'd like to reopen this PR: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=18524 > > and submit a new patch: > > http://www.sharma-home.net/~adsharma/misc/pcpu-cptime.patch > > $ sysctl kern.smp.cpu kern.cp_time > kern.smp.cpu.0.cp_time: 1196 1 2900 351 74120 > kern.smp.cpu.1.cp_time: 1248 3 2837 329 74110 > kern.cp_time: 2444 4 5737 680 148230 > > The ugliest part of this patch is calling mi_cpu_start(cpu). I tried > making the calls in i386/mp_machdep.c, but ran into panics no matter > where I placed the call (mi_cpu_start ends up calling malloc, which may > block, do TLB shoot downs etc). > > So if someone has a better idea about how to arrange for a machine > independent cpu start/stop hook that could make blocking calls, I'd like > to hear about it. Why not stick the cp_time stuff in struct pcpu instead of using an array? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message