All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: george.dunlap@eu.citrix.com, keir@xen.org
Subject: Re: [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu
Date: Mon, 25 Aug 2014 09:35:52 +0100	[thread overview]
Message-ID: <53FB1188020000780002D122@mail.emea.novell.com> (raw)
In-Reply-To: <53F77DC4.4080703@citrix.com>

>>> On 22.08.14 at 19:28, <andrew.cooper3@citrix.com> wrote:
> On 22/08/14 18:15, Dario Faggioli wrote:
>> --- a/xen/arch/x86/smpboot.c
>> +++ b/xen/arch/x86/smpboot.c
>> @@ -59,7 +59,8 @@ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask);
>>  cpumask_t cpu_online_map __read_mostly;
>>  EXPORT_SYMBOL(cpu_online_map);
>>  
>> -struct cpuinfo_x86 cpu_data[NR_CPUS];
>> +struct cpuinfo_x86 cpu_data[NR_CPUS] =
>> +	{ [0 ... NR_CPUS-1] = { .phys_proc_id=-1 } };
> 
> This moves a huge chunk of data from .bss to .data.  Can it not be fixed
> by enumerating topology on APs before setting scheduling up?

Yeah, I was intending to ask the same thing. Just set .phys_proc_id
to -1 early during CPU bringup.

>> --- a/xen/include/asm-x86/processor.h
>> +++ b/xen/include/asm-x86/processor.h
>> @@ -213,8 +213,10 @@ extern void detect_extended_topology(struct cpuinfo_x86 *c);
>>  
>>  extern void detect_ht(struct cpuinfo_x86 *c);
>>  
>> -#define cpu_to_core(_cpu)   (cpu_data[_cpu].cpu_core_id)
>> -#define cpu_to_socket(_cpu) (cpu_data[_cpu].phys_proc_id)
>> +#define cpu_to_core(_cpu)    (cpu_data[_cpu].cpu_core_id)
>> +#define cpu_to_socket(_cpu)  (cpu_data[_cpu].phys_proc_id)
>> +#define boot_cpu_to_core()   (boot_cpu_data.phys_core_id)
>> +#define boot_cpu_to_socket() (boot_cpu_data.phys_proc_id)
> 
> This change is pointless.  Anything explicitly referencing the bsp
> should just use boot_cpu_data directly, rather than obscuring the IDs
> behind macros like this.

If the purpose is to use these in arch-independent code, I think
the "obscuring" actually makes sense.

Jan

  parent reply	other threads:[~2014-08-25  8:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 17:15 [PATCH 0/2] Credit2: fix per-socket runqueue setup Dario Faggioli
2014-08-22 17:15 ` [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu Dario Faggioli
2014-08-22 17:28   ` Andrew Cooper
2014-08-22 18:40     ` Dario Faggioli
2014-08-25  8:35     ` Jan Beulich [this message]
2014-08-25  8:39   ` Jan Beulich
2014-09-01 15:12     ` George Dunlap
2014-09-01 15:24       ` Jan Beulich
2014-08-22 17:15 ` [PATCH 2/2] sched: credit2: use boot CPU info for CPU #0 Dario Faggioli
2014-08-25  8:41   ` Jan Beulich
2014-08-25  8:31 ` [PATCH 0/2] Credit2: fix per-socket runqueue setup Jan Beulich
2014-09-01 13:59   ` George Dunlap
2014-09-02 16:46     ` Dario Faggioli
2014-09-03 10:00       ` George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FB1188020000780002D122@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.