On Sep 7, 2014, at 7:28 PM, Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
wrote:
I have a question about kcpuset. Referring "man 9 kcpuset", the APIs
need cpuid (the type is cpuid_t) to identify CPU. However, the callers
such as idle_loop() sys/kern/kern_idle.c use cpu index (the type is u_int).
cpu index means return value of cpu_index(), and cpu index is sequential
number. On the other hand, cpuid means struct cpu_info.ci_cpuid and cpuid
is non-sequential number at least x86 and sparc architectures. So, cpu index
is different from cpuid. Which should kcpuset use cpuid or cpu index?
ci_cpuid is MD and has no standard semantics.
Use cpu_index(ci) (curcpu()->ci_index)