All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: xl: expose max_cpu_id from `xl info`
Date: Wed, 14 Mar 2012 13:51:21 -0400	[thread overview]
Message-ID: <4F60DA99.9020505@oracle.com> (raw)
In-Reply-To: <4F60C639.1020307@citrix.com>

On 03/14/2012 12:24 PM, Andrew Cooper wrote:
> <snip>
>>>> Is this true: nr_cpus = max_cpu_id + 1 ?
>>>>
>>>> Zhigang
>>> if and only if all cpus are online.
>>>
>>> nr_cpus is set to nr_online_cpus() in the hypercall, while max_cpu_id
>>> is set to nr_cpu_ids-1.
>>>
>>> nr_cpus is liable to change during runtime, while max_cpu_id is not.
>>>
>>> ~Andrew
>> If this is the case, I think nr_cpus is a bit confusing. Can we make
>> it always representing the number of physical cpus (from hypervisor's
>> viewpoint, not dom0)?
>>
>> Zhigang
>>
>>
> No.  The names here reflect the hypercall name parameters.  The
> hypercall cant be changed because it is an ABI, and the "name : value"
> pairs here cant be changed because of backward compatibility with the
> previous toolstack.
>
Ok. Thanks for you info. I think nr_online_cpus() is the right thing here: it
represents online physical cpus from hypervisor's viewpoint.

It's fine to add this output here if  you need it. But for most of the xen
users, the current nr_cpus should be what they want (for how many pcpus they can
use).

Other ways to get full hardware info could be BIOS/SMBIOS/DMI, and I think it's
better than xl info.

Thanks,

Zhigang

  reply	other threads:[~2012-03-14 17:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 16:52 xl: expose max_cpu_id from `xl info` Andrew Cooper
2012-03-13 19:15 ` Zhigang Wang
2012-03-14 10:45   ` Andrew Cooper
2012-03-14 15:48     ` Zhigang Wang
2012-03-14 16:24       ` Andrew Cooper
2012-03-14 17:51         ` Zhigang Wang [this message]
2012-03-14 11:10 ` Ian Jackson

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=4F60DA99.9020505@oracle.com \
    --to=zhigang.x.wang@oracle.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.