[lkml]   [2002]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to get number of physical CPU in linux from user space?
On Fri, Oct 25, 2002 at 01:38:57PM +0100, Dave Jones wrote:
> You can perform cpuid instructions in userspace to get the
> number of siblings per physical package.
Sure. But the problem is that we don't know for sure how many
of the sibling was enable in the kernel. Kernel support up to
2 siblings right now, but it might be more in later kernel. And
user might turn off sibling in kernel.

So divide the number of cpu in cpuinfo by number of siblings per
physical package do not work reliable.

Any comment to add one entry into /proc/cpuinfo to tell which physical
cpu it belong to? I don't mind submit a patch. It will be something
look like:

processor : 2
physical cpu : 1



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:30    [W:0.327 / U:1.548 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site