From: Keir Fraser Subject: Re: Problems with enabling hypervisor C and P-statecontrol Date: Sat, 25 Oct 2008 15:50:02 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" , 'Ian Pratt' , "Yu, Ke" , Niraj Tolia Cc: "Liu, Jinsong" , Xen Developers List-Id: xen-devel@lists.xenproject.org On 25/10/08 04:01, "Tian, Kevin" wrote: >> We really ought to have code in Xen to make the enumeration consistent >> regardless of the BIOS order. I don't really care whether its >> sockets/cores/threads or threads/cores/sockets, but we really ought to >> be consistent. > > If Xen wants to be consistent with one policy, as you suggested, it > requires core/thread info known before booting APs, and then take > that info in alloc_cpu_id. However core/thread info can be only > acquired on AP by CPUID and sibling/core map can be constructed > after all APs are booted. Sort by LAPIC ID. The LAPIC ID is defined to be hierarchical, so this would automatically get us sorting by thread then core then socket. This could be as simple as arranging for the calls to mp_register_lapic() to happen in the correct order. > Then you may need a temporary cpu id > allocated and then switch it to a real one later. This looks a bit > messed on some arrays[NR_CPUS]. Is it worthy of doing that way, > or just expose the mapping between xen cpu id and sockets/cores/ > threads? The mapping between flat identifier and socket/core/thread should be made available, and/or modify tools to accept a hierarchical cpu identifier in addition to the old-style flat identifier. -- Keir