From owner-cvs-src@FreeBSD.ORG Wed Dec 24 08:12:16 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61E5616A4CE for ; Wed, 24 Dec 2003 08:12:16 -0800 (PST) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F89443D49 for ; Wed, 24 Dec 2003 08:12:06 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 16515 invoked from network); 24 Dec 2003 16:12:05 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 24 Dec 2003 16:12:05 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBOGC2M0056192; Wed, 24 Dec 2003 11:12:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031224001758.GT60229@elvis.mu.org> Date: Wed, 24 Dec 2003 11:12:02 -0500 (EST) From: John Baldwin To: Alfred Perlstein X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_smp.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2003 16:12:16 -0000 On 24-Dec-2003 Alfred Perlstein wrote: > * John Baldwin [031223 09:04] wrote: >> >> On 23-Dec-2003 Alfred Perlstein wrote: >> > alfred 2003/12/23 05:54:16 PST >> > >> > FreeBSD src repository >> > >> > Modified files: >> > sys/kern subr_smp.c >> > Log: >> > Introduce mp_maxcpus which can be used by libkvm utils to find out >> > how many CPUs the system was compiled for. >> > Export the variable via a sysctl node 'kern.smp.maxcpus' as well. >> >> Why does libkvm care about more than mp_maxid? > > See mbuf.c from netstat(1). basically some arrays in the kernel > are based on MAXCPU so it has to know how much to copy. It only needs to copy up to mp_maxid though. All the rest after that are just garbage anyways and you merely waste time by copying that. I guess if you have a structure containing multiple arrays then that would need maxcpu. If the arrays are standalone you don't need it though. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/