xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ed Swierk <eswierk@skyportsystems.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Chao Peng <chao.p.peng@linux.intel.com>,
	xen-devel@lists.xen.org,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: Crash in set_cpu_sibling_map() booting Xen 4.6.0 on Fusion
Date: Tue, 24 Nov 2015 06:13:27 -0800	[thread overview]
Message-ID: <CAO_EM_noDTYNV2F1qK4+WQTn4uFs-NpjCC0g9cFzc8Nsmm9A2Q@mail.gmail.com> (raw)
In-Reply-To: <56544B5502000078000B84F4@prv-mh.provo.novell.com>

On Tue, Nov 24, 2015 at 2:34 AM, Jan Beulich <JBeulich@suse.com> wrote:
> Indeed, and I think I had said so. The algorithm does, however, tell
> us that with the above output CPU 3 (APIC ID 6) is on socket 6 (both
> shifts being zero), which for the whole system results in sockets 1,
> 3, and 5 unused. While not explicitly excluded, I'm not sure how far
> we should go in expecting all kinds of odd configurations (along those
> lines we e.g. have a limit on the largest APIC ID we allow: MAX_APICS /
> MAX_LOCAL_APIC, which for big systems is 4 times the number of
> CPUs we support).

That's why I thought it reasonable to substitute MAX_APICS for
nr_sockets in sizing the socket_cpumask array.

> Taking it to set_nr_sockets(), a pretty basic assumption is broken by
> the above way of presenting topology: We would have to have more
> sockets than there are CPUs. I would have wanted to check what
> e.g. Linux does here, but there doesn't seem to be any support of
> CAT (and hence any need for per-socket data) there.

I looked at Linux, and there is no per-socket bookkeeping, AFAICT.

> (I am, btw, now also confused by you saying that e.g. for a 3-CPU
> config things work. If the topology data gets presented in similar
> ways in that case, I can't see why you wouldn't run into the same
> problem. Unless memory corruption occurs silently in one case, but
> "loudly" in the other.)

For 3, 6 and 12 CPUs, Fusion presents a completely different topology,
with 3-core sockets numbered consecutively starting with 0.

> Bottom line - for the moment I do not see a reasonable way of
> dealing with that situation. The closest I could see would be what
> we iirc had temporarily during the review cycles of the initial CAT
> series: A command line option to specify the number of sockets. Or
> make all accesses to socket_cpumask[] conditional upon PSR being
> enabled (which would have the bad side effect of making future
> uses for other purposes more cumbersome), or go through and
> range check the socket number on all of those accesses.

Could we avoid the issue by replacing socket_cpumask array with a list
or hashtable, indexed by socket ID?

> Chao, could you - inside Intel - please check whether there are
> any assumptions on the respective CPUID leaf output that aren't
> explicitly stated in the SDM right now (like resulting in contiguous
> socket numbers), and ask for them getting made explicit (if there
> are any), or it being made explicit that no assumptions at all are
> to be made at all on the presented values (in which case we'd
> have to consume MADT parsing data in set_nr_sockets(), e.g.
> by replacing num_processors there with one more than the
> maximum APIC ID of any non-disabled CPU)?

I suppose the key is whether Intel has encoded such assumptions in the
BIOS reference code, or has otherwise communicated them to AMI et al.

--Ed

  reply	other threads:[~2015-11-24 14:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  1:22 Crash in set_cpu_sibling_map() booting Xen 4.6.0 on Fusion Ed Swierk
2015-11-20 10:25 ` Jan Beulich
2015-11-20 10:37   ` Andrew Cooper
2015-11-20 18:53   ` Ed Swierk
2015-11-21  1:21     ` Ed Swierk
2015-11-23  1:10       ` Chao Peng
2015-11-23  5:39         ` Chao Peng
2015-11-23 10:18       ` Jan Beulich
2015-11-23 16:36         ` Ed Swierk
2015-11-24 10:34           ` Jan Beulich
2015-11-24 14:13             ` Ed Swierk [this message]
2015-11-24 15:20               ` Jan Beulich
2015-11-24 20:28                 ` Ed Swierk
2015-11-25  9:11                   ` Jan Beulich
2015-12-02 13:48                   ` Jan Beulich
2015-12-02 15:39                     ` Ed Swierk
2015-11-25  7:48             ` Chao Peng
2015-11-25  9:04               ` Jan Beulich
2015-11-25 23:27                 ` Ed Swierk
2015-11-26  7:49                   ` Jan Beulich
2015-11-27  2:11                     ` Chao Peng
2015-12-02  2:55                       ` Nakajima, Jun

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=CAO_EM_noDTYNV2F1qK4+WQTn4uFs-NpjCC0g9cFzc8Nsmm9A2Q@mail.gmail.com \
    --to=eswierk@skyportsystems.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).