From owner-freebsd-smp Thu Feb 6 8:46:15 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 7AA9E37B401; Thu, 6 Feb 2003 08:46:14 -0800 (PST) Received: from eagle.sharma-home.net (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC81943F3F; Thu, 6 Feb 2003 08:46:12 -0800 (PST) (envelope-from adsharma@eagle.sharma-home.net) Received: by eagle.sharma-home.net (Postfix, from userid 500) id A3B88817C; Thu, 6 Feb 2003 08:50:49 -0800 (PST) Date: Thu, 6 Feb 2003 08:50:49 -0800 From: Arun Sharma To: John Baldwin Cc: smp@freebsd.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/18524: The current kernel doesn't keep stats on a per c Message-ID: <20030206165049.GA11373@sharma-home.net> References: <3E420FBA.90504@sharma-home.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i 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 Thu, Feb 06, 2003 at 11:13:15AM -0500, John Baldwin wrote: > > and submit a new patch: > > > > http://www.sharma-home.net/~adsharma/misc/pcpu-cptime.patch > > [...] > > Why not stick the cp_time stuff in struct pcpu instead of using an > array? The new patch _is_ putting cp_time in struct pcpu. The old patch in the PR predates struct pcpu. I also chose to leave the existing cp_time alone. One could argue that a user level tool could sum up the pcpu cp_times to derive the cp_time and the kernel can avoid dirtying an extra cache line. If people feel strongly about it, I can skip touching cp_time in the SMP case. It's a choice between compatibility with UP vs performance. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message