xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* strange cpu number from xm info
@ 2012-04-06 12:45 Zhigang Wang
  2012-04-06 19:52 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Zhigang Wang @ 2012-04-06 12:45 UTC (permalink / raw)
  To: xen-devel

Hi,

I see this output from xm info:

# xm info
...

release                : 2.6.32.21-45.6xen
version                : #1 SMP Wed Feb 29 23:42:59 EST 2012
machine                : x86_64
nr_cpus                : 8
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 2826

I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core

But the above output is not.

Could anyone explain it a little?

Thanks,

Zhigang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-04-06 12:45 strange cpu number from xm info Zhigang Wang
@ 2012-04-06 19:52 ` Jan Beulich
  2012-04-06 20:01   ` Zhigang Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2012-04-06 19:52 UTC (permalink / raw)
  To: zhigang.x.wang; +Cc: xen-devel

>>> Zhigang Wang <zhigang.x.wang@oracle.com> 04/06/12 2:45 PM >>>
>nr_cpus                : 8
>nr_nodes               : 1
>cores_per_socket       : 4
>threads_per_core       : 1
>
>I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core

nr_cpus = nr_nodes * sockets_per_node * cores_per_socket * threads_per_core

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-04-06 19:52 ` Jan Beulich
@ 2012-04-06 20:01   ` Zhigang Wang
  2012-04-06 21:09     ` Dan Magenheimer
  2012-04-07  7:39     ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: Zhigang Wang @ 2012-04-06 20:01 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On 04/06/2012 03:52 PM, Jan Beulich wrote:
>>>> Zhigang Wang <zhigang.x.wang@oracle.com> 04/06/12 2:45 PM >>>
>> nr_cpus                : 8
>> nr_nodes               : 1
>> cores_per_socket       : 4
>> threads_per_core       : 1
>>
>> I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core
> nr_cpus = nr_nodes * sockets_per_node * cores_per_socket * threads_per_core
It seems on xm/xl info we don't show how many sockets_per_node. Can we do that
in the future?

It seems this machine has: sockets_per_node = 2.

Thanks very much Jan.

Zhigang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-04-06 20:01   ` Zhigang Wang
@ 2012-04-06 21:09     ` Dan Magenheimer
  2012-04-07  7:39     ` Ian Campbell
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Magenheimer @ 2012-04-06 21:09 UTC (permalink / raw)
  To: Zhigang Wang, Jan Beulich; +Cc: xen-devel

> From: Zhigang Wang
> Sent: Friday, April 06, 2012 2:01 PM
> To: Jan Beulich
> Cc: xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] strange cpu number from xm info
> 
> On 04/06/2012 03:52 PM, Jan Beulich wrote:
> >>>> Zhigang Wang <zhigang.x.wang@oracle.com> 04/06/12 2:45 PM >>>
> >> nr_cpus                : 8
> >> nr_nodes               : 1
> >> cores_per_socket       : 4
> >> threads_per_core       : 1
> >>
> >> I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core
> > nr_cpus = nr_nodes * sockets_per_node * cores_per_socket * threads_per_core
> It seems on xm/xl info we don't show how many sockets_per_node. Can we do that
> in the future?
> 
> It seems this machine has: sockets_per_node = 2.
> 
> Thanks very much Jan.
> 
> Zhigang

Hi Zhigang --

Unfortunately, the world of CPUs is getting more complicated
and can no longer be described so simply.  See for example:

http://lists.xen.org/archives/html/xen-devel/2009-11/msg00885.html 

On a Friday afternoon, this makes my head hurt...

Dan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-04-06 20:01   ` Zhigang Wang
  2012-04-06 21:09     ` Dan Magenheimer
@ 2012-04-07  7:39     ` Ian Campbell
  2012-05-31 13:15       ` Zhigang Wang
  1 sibling, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2012-04-07  7:39 UTC (permalink / raw)
  To: Zhigang Wang; +Cc: Jan Beulich, xen-devel

On Fri, 2012-04-06 at 21:01 +0100, Zhigang Wang wrote:
> On 04/06/2012 03:52 PM, Jan Beulich wrote:
> >>>> Zhigang Wang <zhigang.x.wang@oracle.com> 04/06/12 2:45 PM >>>
> >> nr_cpus                : 8
> >> nr_nodes               : 1
> >> cores_per_socket       : 4
> >> threads_per_core       : 1
> >>
> >> I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core
> > nr_cpus = nr_nodes * sockets_per_node * cores_per_socket * threads_per_core
> It seems on xm/xl info we don't show how many sockets_per_node. Can we do that
> in the future?

We can and should. Are you able to send a patch for xl at least?

Thanks,
Ian.

> It seems this machine has: sockets_per_node = 2.
> 
> Thanks very much Jan.
> 
> Zhigang
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-04-07  7:39     ` Ian Campbell
@ 2012-05-31 13:15       ` Zhigang Wang
  2012-05-31 14:00         ` Dario Faggioli
  0 siblings, 1 reply; 7+ messages in thread
From: Zhigang Wang @ 2012-05-31 13:15 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Dan Magenheimer, Jan Beulich, xen-devel

On 04/07/2012 03:39 AM, Ian Campbell wrote:
> On Fri, 2012-04-06 at 21:01 +0100, Zhigang Wang wrote:
>> On 04/06/2012 03:52 PM, Jan Beulich wrote:
>>>>>> Zhigang Wang <zhigang.x.wang@oracle.com> 04/06/12 2:45 PM >>>
>>>> nr_cpus                : 8
>>>> nr_nodes               : 1
>>>> cores_per_socket       : 4
>>>> threads_per_core       : 1
>>>>
>>>> I thought nr_cpus = nr_nodes * cores_per_socket * threads_per_core
>>> nr_cpus = nr_nodes * sockets_per_node * cores_per_socket * threads_per_core
>> It seems on xm/xl info we don't show how many sockets_per_node. Can we do that
>> in the future?
> We can and should. Are you able to send a patch for xl at least?
>
>
Here is another case:

    # xm info
    ...
    nr_cpus                : 48
    nr_nodes               : 8
    cores_per_socket       : 12
    threads_per_core       : 1

This HP BL685 G7 (4 socket x 12 cores).

Actually sockets_per_node = 0.5. Xen calculates it correctly.

Should we should s 0.5 for sockets_per_node? Or just ignore sockets_per_node?

Thanks,

Zhigang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange cpu number from xm info
  2012-05-31 13:15       ` Zhigang Wang
@ 2012-05-31 14:00         ` Dario Faggioli
  0 siblings, 0 replies; 7+ messages in thread
From: Dario Faggioli @ 2012-05-31 14:00 UTC (permalink / raw)
  To: Zhigang Wang; +Cc: Dan Magenheimer, Ian Campbell, Jan Beulich, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1308 bytes --]

On Thu, 2012-05-31 at 09:15 -0400, Zhigang Wang wrote: 
> > We can and should. Are you able to send a patch for xl at least?
> >
> >
> Here is another case:
> 
>     # xm info
>     ...
>     nr_cpus                : 48
>     nr_nodes               : 8
>     cores_per_socket       : 12
>     threads_per_core       : 1
> 
> This HP BL685 G7 (4 socket x 12 cores).
> 
> Actually sockets_per_node = 0.5. Xen calculates it correctly.
> 
> Should we should s 0.5 for sockets_per_node? Or just ignore sockets_per_node?
> 
I looked a bit into this and found out there has been some discussion
already on why such a "counter" (sockets_per_node) has been removed and
shouldn't be reintroduced, and those archs yielding fractional numbers
for it seem to be right that cause:

http://old-list-archives.xen.org/xen-changelog/2010-04/msg00074.html
http://old-list-archives.xen.org/archives/html/xen-devel/2010-02/msg00005.html

Not sure what TheRightThing is here, just wanted to point these out...

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)



[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-31 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 12:45 strange cpu number from xm info Zhigang Wang
2012-04-06 19:52 ` Jan Beulich
2012-04-06 20:01   ` Zhigang Wang
2012-04-06 21:09     ` Dan Magenheimer
2012-04-07  7:39     ` Ian Campbell
2012-05-31 13:15       ` Zhigang Wang
2012-05-31 14:00         ` Dario Faggioli

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).