From owner-freebsd-bugs Wed Feb 5 23:40:10 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D5D737B401 for ; Wed, 5 Feb 2003 23:40:09 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FEB843FB1 for ; Wed, 5 Feb 2003 23:40:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h167e8NS095589 for ; Wed, 5 Feb 2003 23:40:08 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h167e8oR095588; Wed, 5 Feb 2003 23:40:08 -0800 (PST) Date: Wed, 5 Feb 2003 23:40:08 -0800 (PST) Message-Id: <200302060740.h167e8oR095588@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Arun Sharma Subject: Re: kern/18524: The current kernel doesn't keep stats on a per cpu basis Reply-To: Arun Sharma Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/18524; it has been noted by GNATS. From: Arun Sharma To: freebsd-gnats-submit@FreeBSD.org Cc: smp@freebsd.org Subject: Re: kern/18524: The current kernel doesn't keep stats on a per cpu basis Date: Wed, 05 Feb 2003 23:33:14 -0800 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. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message