All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible man numactl error?
@ 2010-02-11 14:26 MacCana, Mike
  2010-02-11 14:40 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: MacCana, Mike @ 2010-02-11 14:26 UTC (permalink / raw)
  To: linux-numa

Hi NUMA folks,
 
I've spotted what appears to be an inconsistency between man numactl and
/proc & /sys.
 
       --physcpubind=cpus, -C cpus
              Only  execute  process  on cpus.  This accepts physical
cpu numbers as shown in the processor fields of /proc/cpuinfo.
 
However the processor field of /proc/cpuinfo refers to logical
processors (ie, run queues), not physical ones. Eg:
 
$ grep processor /proc/cpuinfo 
processor       : 0
processor       : 1
... 
Compared to:

$ cat /sys/devices/system/cpu/cpu0/topology/physical_package_id 
0

$ cat /sys/devices/system/cpu/cpu1/topology/physical_package_id 
0

I.e., CPUs 0 and 1 are clearly on the same physical package. 

Futhermore, physical CPU numbers are shown with the string 'physical id'
not 'processor' in /proc/cpuinfo. 
 
Is the numactl man page incorrect, or am I missing something? Does -C
work on physical CPUs but just have bad documentation, or does it mean
logical CPUs per the documentation?
 
Thanks,
 
Mike

=============================================================================== 
 Please access the attached hyperlink for an important electronic communications disclaimer: 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
 =============================================================================== 
 

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

* Re: Possible man numactl error?
  2010-02-11 14:26 Possible man numactl error? MacCana, Mike
@ 2010-02-11 14:40 ` Andi Kleen
  2010-02-11 14:49   ` MacCana, Mike
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2010-02-11 14:40 UTC (permalink / raw)
  To: MacCana, Mike; +Cc: linux-numa

On Thu, Feb 11, 2010 at 02:26:14PM -0000, MacCana, Mike wrote:
> I've spotted what appears to be an inconsistency between man numactl and
> /proc & /sys.
>  
>        --physcpubind=cpus, -C cpus
>               Only  execute  process  on cpus.  This accepts physical
> cpu numbers as shown in the processor fields of /proc/cpuinfo.

"physical CPU" in this case means CPUs as shown by cpuinfo,
not APIC IDs or package ids or anything like that. 

> However the processor field of /proc/cpuinfo refers to logical
> processors (ie, run queues), not physical ones. Eg:

I don't think the term 'logical CPU' or 'run queues'
is used anywhere in the kernel for CPU numbers.

Perhaps the man page could be clarified (mostly for people
who think too complicated like you :-) and yes perhaps
it is better in this age with all kinds of virtual CPUs

-Andi

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

* RE: Possible man numactl error?
  2010-02-11 14:40 ` Andi Kleen
@ 2010-02-11 14:49   ` MacCana, Mike
  0 siblings, 0 replies; 3+ messages in thread
From: MacCana, Mike @ 2010-02-11 14:49 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-numa

-----Original Message-----
From: Andi Kleen [mailto:andi@firstfloor.org]
Sent: 11 February 2010 14:41
To: MacCana, Mike
Cc: linux-numa@vger.kernel.org
Subject: Re: Possible man numactl error?

>On Thu, Feb 11, 2010 at 02:26:14PM -0000, MacCana, Mike wrote:
>> I've spotted what appears to be an inconsistency between man numactl
>> and /proc & /sys.
>> 
>>        --physcpubind=cpus, -C cpus
>>               Only  execute  process  on cpus.  This accepts physical
>> cpu numbers as shown in the processor fields of /proc/cpuinfo.

>"physical CPU" in this case means CPUs as shown by cpuinfo, not APIC
IDs or package ids or anything like that.
> Perhaps the man page could be clarified (mostly for people who think
too complicated like you :-) and yes perhaps it is better in this age
with all kinds of virtual CPUs

Thanks for the quick reply. I agree, the man page (and the long switch
name) are confusing - I've never heard the term 'physical CPU' to mean
anything other than a CPU die / package. 
 
Mike


=============================================================================== 
 Please access the attached hyperlink for an important electronic communications disclaimer: 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
 =============================================================================== 
 

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

end of thread, other threads:[~2010-02-11 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 14:26 Possible man numactl error? MacCana, Mike
2010-02-11 14:40 ` Andi Kleen
2010-02-11 14:49   ` MacCana, Mike

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.