From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu Date: Mon, 1 Sep 2014 16:12:06 +0100 Message-ID: <54048CC6.2030006@eu.citrix.com> References: <20140822165628.32764.15082.stgit@Solace.lan> <20140822171534.32764.77550.stgit@Solace.lan> <53FB1246020000780002D125@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XOTHL-0000xi-UE for xen-devel@lists.xenproject.org; Mon, 01 Sep 2014 15:12:24 +0000 In-Reply-To: <53FB1246020000780002D125@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Dario Faggioli Cc: Andrew Cooper , keir@xen.org, xen-devel List-Id: xen-devel@lists.xenproject.org On 08/25/2014 09:39 AM, Jan Beulich wrote: >>>> On 22.08.14 at 19:15, wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -1262,6 +1262,12 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> >> timer_init(); >> >> + /* >> + * Identify the boot CPU, in case the scheduler initialization >> + * needs to know about it (e.g., topology, etc.) >> + */ >> + identify_cpu(&boot_cpu_data); >> + >> init_idle_domain(); >> >> trap_init(); >> @@ -1272,8 +1278,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> >> arch_init_memory(); >> >> - identify_cpu(&boot_cpu_data); >> - >> if ( cpu_has_fxsr ) >> set_in_cr4(X86_CR4_OSFXSR); >> if ( cpu_has_xmm ) > I'm not sure about this part: It currently makes quite a bit of sense > to have identify_cpu() immediately before explicit users of the > gathered data (all code following up to the alternative_instructions() > call). Perhaps if you move identify_cpu(), all the others should get > moved too? Or possibly, move init_idle_domain() until after? I took a quick look through the functions called between init_idle_domain() and identify_cpu(), and didn't see any dependencies on the idle domain or scheduling functions. It's quite possible I missed something though. Overall I think this approach looks good, and I agree with the comments already given. -George