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

From: Yanfei Wang
Date: Wed Jul 24 2013 - 12:09:55 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/