How are cpu physical id & processor determined in /proc/cpuinfo ?

From: Yanfei Wang <hidden>
Date: 2013-07-24 16:09:52
Also in: lkml

We found that, the sequence of processor and physical id are not same
with different platform.

Conf 1:

6cores processor *2 with numa-enabled.
kernel 3.1.0
Ceontos 6.3

Conf 2:

6cores processor *2 with numa-enabled.
kernel 3.1.0
Ceontos 6.3

Conf 1 and Conf2 own same OS, kernel, and CPU, the sequences of
physical id from "cat /proc/cpuinfo" is not same.

Conf1 has sequence  with "cat /proc/cpuinfo |grep "physical id""
physical id:0
physical id:1
physical id:0
physical id:1
physical id:0
physical id:1
physical id:0
physical id:1
physical id:0
physical id:1
physical id:0
physical id:1
...
Conf2 has following sequence instead:
physical id:0
physical id:0
physical id:0
physical id:0
physical id:0
physical id:0
physical id:1
physical id:1
physical id:1
physical id:1
physical id:1
physical id:1

--------
different cpu physical id sequence can probably causes severe
numa-cross memory access for our program whose memory allocation
depends directly on the logical cpu id, rather than carefully get numa
node information with portable numa-API.

Any one can clarify our trouble, thanks a lot.

BR.
Yanfei Wang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help