From: "Ray Bryant" Subject: Re: [PATCH][RFC] New command: xm pcpu-list Date: Fri, 22 Sep 2006 13:41:25 -0500 Message-ID: <200609221341.26120.raybry@mpdtxmail.amd.com> References: <84C6DE42B3E3F3kanno.masaki@jp.fujitsu.com> <3AAA99889D105740BE010EB6D5A5A3B202A307@paddington.ad.cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <3AAA99889D105740BE010EB6D5A5A3B202A307@paddington.ad.cl.cam.ac.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Pratt , xen-ppc-devel@lists.xensource.com, Masaki Kanno , xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Friday 22 September 2006 07:56, Ian Pratt wrote: > > The example you give below is a truly bizarre enumeration of CPUs. X86 > does effectively enumerates [nodes][sockets][cores][threads] (in C > terminology), hence on a hyperthreaded system PCPU 0 and 1 are in the > same core. > Not all X86 machines work this way. For Linux, it depends on the order in which the processors appear in the SRAT table (or MP table?), as I recall, and I imagine the same is true for Xen. Most system manufacturers write the BIOS so that the processor ordering is as you describe. That is logical processors 0 and 1 are both on socket 0, 2 and 3 are on socket 1, etc. However, we have encountered BIOS's for AMD procesors which this numbering is done with logical 0 and 1 being core 0 on socket 0 and 1, respectively. The numbering continues this way, until all sockets have been enumerated, then (in a 4-socket system), logical processor 4 is core 1 on socket 0, 5 is core 1 on socket 1, etc. The apparent rationale for this is that IF you decide to boot the system with only 4 processors, then you get one active core on each socket. (Here logical processor number is the number that smp_processor_id() returns.) -- Ray Bryant AMD Performance Labs Austin, Tx 512-602-0038 (o) 512-507-7807 (c)