All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Chao Peng <chao.p.peng@linux.intel.com>
Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86: correct socket_cpumask allocation for AP
Date: Wed, 08 Jul 2015 11:45:32 -0400	[thread overview]
Message-ID: <559D459C.7060808@oracle.com> (raw)
In-Reply-To: <559D602C020000780008E585@mail.emea.novell.com>

On 07/08/2015 11:38 AM, Jan Beulich wrote:
>>>> On 08.07.15 at 17:11, <dario.faggioli@citrix.com> wrote:
>> On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote:
>>>>>> On 08.07.15 at 11:36, <chao.p.peng@linux.intel.com> wrote:
>>>> @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS];
>>>>   static void smp_store_cpu_info(int id)
>>>>   {
>>>>       struct cpuinfo_x86 *c = cpu_data + id;
>>>> +    unsigned int socket;
>>>>   
>>>>       *c = boot_cpu_data;
>>>>       if ( id != 0 )
>>>> +    {
>>>>           identify_cpu(c);
>>>>   
>>>> +        socket = cpu_to_socket(id);
>>>> +        if ( !socket_cpumask[socket] )
>>>> +        {
>>>> +            socket_cpumask[socket] = secondary_socket_cpumask;
>>>> +            secondary_socket_cpumask = NULL;
>>> I don't think this will build with small enough NR_CPUS.
>>>
>> And it *does* *not* fix the issue on my box.
> I.e. bad analysis (albeit it seemed correct to me) _and_ new code
> not tested. Chao, one more try, or we'll have to revert the whole
> series (closing the window for it for 4.6).

FWIW, this fixes it for me:

diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index c73aa1b..a93c723 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -707,6 +707,8 @@ static int cpu_smpboot_alloc(unsigned int cpu)
      unsigned long stub_page;
      unsigned int socket = cpu_to_socket(cpu);

+    socket = cpu >> 4;
+
      if ( node != NUMA_NO_NODE )
          memflags = MEMF_node(node);



But I suspect this is not what you want ;-)

-boris

  reply	other threads:[~2015-07-08 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08  9:36 [PATCH] x86: correct socket_cpumask allocation for AP Chao Peng
2015-07-08 12:38 ` Jan Beulich
2015-07-08 15:11   ` Dario Faggioli
2015-07-08 15:38     ` Jan Beulich
2015-07-08 15:45       ` Boris Ostrovsky [this message]
2015-07-08 16:17       ` Dario Faggioli
2015-07-08 16:32         ` Jan Beulich
2015-07-09  1:58           ` Chao Peng
2015-07-09  8:39             ` Dario Faggioli
2015-07-08 18:24         ` Boris Ostrovsky
2015-07-09  1:47       ` Chao Peng

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=559D459C.7060808@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=dario.faggioli@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.