[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu



>>> On 01.09.14 at 17:12, <george.dunlap@xxxxxxxxxxxxx> wrote:
> On 08/25/2014 09:39 AM, Jan Beulich wrote:
>>>>> On 22.08.14 at 19:15, <dario.faggioli@xxxxxxxxxx> 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.

If it wasn't scheduler_init() setting up the idle domain, moving it
further down would have been an option; I'd rather not defer
set_current() more than necessary, namely e.g. past rcu_init()
(even if currently there may not be an actual dependency).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.