Re: [PATCH v2 8/8] x86/vdso: Move out the CPU number store
From: Bae, Chang Seok
Date: Wed Jun 06 2018 - 19:00:02 EST
> On Wed, Jun 6, 2018 at 10:25 AM Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>> On Wed, Jun 6, 2018 at 9:23 AM Chang S. Bae <chang.seok.bae@xxxxxxxxx> wrote:
>> +static inline void setup_cpu_number_segment(int cpu)
>> +{
>> +#ifdef CONFIG_NUMA
>> + unsigned long node = early_cpu_to_node(cpu);
>> +#else
>> + unsigned long node = 0;
>> +#endif
> This duplicates half the rdtscp_aux code. How about making this one
> function setup_cpu_number() that does all of it?
Looks like the segment setup done during early boot (single-threaded).
So, separating MSR TSC_AUX setup out to each CPU initialization seems
to be still reasonable to me.
Thanks,
Chang