Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Mar 2002 17:43:22 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Jeff Roberson <jeff@FreeBSD.org>
Subject:   RE: cvs commit: src/sys/sys smp.h src/sys/kern subr_smp.c src/sy
Message-ID:  <XFMail.020306174322.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0203051025390.36237-100000@beppo>

next in thread | previous in thread | raw e-mail | index | archive | help

On 05-Mar-02 Matthew Jacob wrote:
> 
> We went thru this discussion a while back. There's no reason why we can't
> make
> CPUid virtual, right? Except that it does cost in terms of performance if you
> then have to fetch the hardware id.

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?

> On Tue, 5 Mar 2002, John Baldwin wrote:
> 
>> 
>> On 05-Mar-02 Jeff Roberson wrote:
>> > jeff        2002/03/05 02:01:46 PST
>> > 
>> >   Modified files:
>> >     sys/sys              smp.h 
>> >     sys/kern             subr_smp.c 
>> >     sys/i386/i386        mp_machdep.c 
>> >     sys/alpha/alpha      mp_machdep.c 
>> >   Log:
>> >   Add a new variable mp_maxid.  This is used so that per cpu
>> >   datastructures
>> > may
>> >   be allocated as arrays indexed by the cpu id.  Previously the only
>> >   reliable
>> >   way to know the max cpu id was through MAXCPU. mp_ncpus isn't useful
>> >   here
>> >   because cpu ids may be sparsely mapped, although x86 and alpha do not do
>> > this.
>> 
>> Actually, alpha ID's can be sparse as they are just phyiscal ID's which are
>> tied to the slots the CPU's are in.
>> 
>> >   Also, call cpu_mp_probe much earlier so the max cpu id is known before
>> >   the
>> > VM
>> >   starts up.  This is intended to help support per cpu queues for the new
>> >   allocator, but may be useful elsewhere.
>> >   
>> >   Reviewed by:    jake
>> >   Approved by:    jake
>> >   
>> >   Revision  Changes    Path
>> >   1.34      +2 -0      src/sys/alpha/alpha/mp_machdep.c
>> >   1.179     +4 -1      src/sys/i386/i386/mp_machdep.c
>> >   1.163     +14 -2     src/sys/kern/subr_smp.c
>> >   1.70      +1 -0      src/sys/sys/smp.h
>> 
>> -- 
>> 
>> John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
>> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
>> 
> 

-- 

John Baldwin <jhb@FreeBSD.org>  <><  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 cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020306174322.jhb>