From owner-cvs-all Wed Mar 6 14:54:43 2002 Delivered-To: cvs-all@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id 8C58A37B400; Wed, 6 Mar 2002 14:54:35 -0800 (PST) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id g26MsZf33982; Wed, 6 Mar 2002 14:54:35 -0800 (PST) (envelope-from mjacob@feral.com) Date: Wed, 6 Mar 2002 14:54:35 -0800 (PST) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: John Baldwin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Jeff Roberson Subject: RE: cvs commit: src/sys/sys smp.h src/sys/kern subr_smp.c src/sy In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > If someone wants to make them virtual then they can do it I suppose. > However, that doesn't help if you ever want to support the notion of > removing and adding CPU's at runtime. You would still have to deal with > sparse ID's in that case, so maybe it's just better to not assume packed > ID's to begin with? Well, yes and no. There's two issues here. Yes, you should assume a sparse space. But it's also convenient to know that there's some bounded (less than 1000, e.g.) number of CPUs so you can do arrays sizes, etc. It would also be able to index conveniently off of some number related to the currently running CPU instead of going "I'm CPU-ID 0x7abcdefg..hmm. Now let me search my database so I can find the softc that corresponds to this....". I suppose I'm just stretching it a bit. It seems to me you want to know some tag that identifies a particular CPU so you can index into associated information- usually. Simple and short number ranges (0..MAXCPU) are good for that. Knowing the actual h/w ID of the CPU is usually a platform specific thingie- possibly necesary for context switch support, but also easily derivable from the PCPU info that you get after indexing off of the 'virtual' id. Your argument about removing/adding CPUs isn't germane to this, really. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message