Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-25 Thread Thomas Gleixner
On Mon, 25 Jun 2018, H. Peter Anvin wrote:

> On 06/25/18 08:40, Thomas Gleixner wrote:
> > On Fri, 22 Jun 2018, Andy Lutomirski wrote:
> > 
> >> On Fri, Jun 22, 2018 at 11:02 AM Bae, Chang Seok
> >>  wrote:
> >>>
>  Still setup_cpu_number() sucks.
> >>>
> >>> How about setup_cpu_and_node_number()?
> >>
> >> setup_fast_cpu_node_nr()?  setup_cpunr_regs()?  I don't have any
> >> brilliant ideas.  Thomas?
> > 
> > It's really hard to find a good one. setup_cpu_node_cache() might work, but
> > it's not brilliant either.
> > 
> 
> Since this applies to the getcpu(2) system call (in addition to the
> kernel usage), perhaps setup_getcpu()?

Works for me.


Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-25 Thread H. Peter Anvin
On 06/25/18 08:40, Thomas Gleixner wrote:
> On Fri, 22 Jun 2018, Andy Lutomirski wrote:
> 
>> On Fri, Jun 22, 2018 at 11:02 AM Bae, Chang Seok
>>  wrote:
>>>
 Still setup_cpu_number() sucks.
>>>
>>> How about setup_cpu_and_node_number()?
>>
>> setup_fast_cpu_node_nr()?  setup_cpunr_regs()?  I don't have any
>> brilliant ideas.  Thomas?
> 
> It's really hard to find a good one. setup_cpu_node_cache() might work, but
> it's not brilliant either.
> 

Since this applies to the getcpu(2) system call (in addition to the
kernel usage), perhaps setup_getcpu()?

-hpa



Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-25 Thread Thomas Gleixner
On Fri, 22 Jun 2018, Andy Lutomirski wrote:

> On Fri, Jun 22, 2018 at 11:02 AM Bae, Chang Seok
>  wrote:
> >
> > > Still setup_cpu_number() sucks.
> >
> > How about setup_cpu_and_node_number()?
> 
> setup_fast_cpu_node_nr()?  setup_cpunr_regs()?  I don't have any
> brilliant ideas.  Thomas?

It's really hard to find a good one. setup_cpu_node_cache() might work, but
it's not brilliant either.

Thanks,

tglx



Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-22 Thread Andy Lutomirski
On Fri, Jun 22, 2018 at 11:02 AM Bae, Chang Seok
 wrote:
>
> > Still setup_cpu_number() sucks.
>
> How about setup_cpu_and_node_number()?

setup_fast_cpu_node_nr()?  setup_cpunr_regs()?  I don't have any
brilliant ideas.  Thomas?


RE: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-22 Thread Bae, Chang Seok
> Still setup_cpu_number() sucks.

How about setup_cpu_and_node_number()?

Thanks, 
Chang


Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-22 Thread Thomas Gleixner
On Fri, 22 Jun 2018, Andy Lutomirski wrote:
> > On Jun 22, 2018, at 8:18 AM, Thomas Gleixner  wrote:
> > 
> >> On Wed, 20 Jun 2018, Chang S. Bae wrote:
> >> 
> >> +#ifdef CONFIG_X86_64
> >> +static void setup_cpu_number(int cpu)
> > 
> > This function name is really misleading. vdso_setup_cpu_and_node() or
> > something like that clearly tells what this is about.
> > 
> Ah. The big secret is that it’s not just vDSO, or at lease hpa wants to
> start using it in the entry code.

Fair enough. Still setup_cpu_number() sucks.

Thanks,

tglx

Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-22 Thread Andy Lutomirski


> On Jun 22, 2018, at 8:18 AM, Thomas Gleixner  wrote:
> 
>> On Wed, 20 Jun 2018, Chang S. Bae wrote:
>> 
>> +#ifdef CONFIG_X86_64
>> +static void setup_cpu_number(int cpu)
> 
> This function name is really misleading. vdso_setup_cpu_and_node() or
> something like that clearly tells what this is about.
> 

Ah. The big secret is that it’s not just vDSO, or at lease hpa wants to start 
using it in the entry code.

> Thanks,
> 
>tglx


Re: [PATCH v4 7/7] x86/vdso: Move out the CPU number store

2018-06-22 Thread Thomas Gleixner
On Wed, 20 Jun 2018, Chang S. Bae wrote:
>  
> +#ifdef CONFIG_X86_64
> +static void setup_cpu_number(int cpu)

This function name is really misleading. vdso_setup_cpu_and_node() or
something like that clearly tells what this is about.

Thanks,

tglx