単純だが、Processor ID 0 から #cores-1 まで、CPU_SET & sched_setaffinity した状態で APIC ID を調べるだけで、Processor ID - APICID 対応表が完成する。 ● Intel(R) Xeon(R) CPU X5460 @ 3.16GHz (4cores x 2sockets) 0-th core -> 00 apicid 1-th core -> 04 apicid 2-th core -> 02 apicid 3-th core -> 06 apicid 4-th core -> 01 apicid 5-th core -> 05 apicid 6-th core -> 03 apicid 7-th core -> 07 apicid ● Intel(R) Xeon(R) CPU X5550 @ 2.67GHz (
![Processor ID と APIC ID その2 - 研究日誌。](https://cdn-ak-scissors.b.st-hatena.com/image/square/df3a50c14b465108d37d0f484920317dd74971fb/height=288;version=1;width=512/http%3A%2F%2Fu.xgoo.jp%2Fimg%2Fsns%2Fblog.png)