On Sep 7, 2014, at 8:51 PM, Kengo NAKAHARA <[email protected]> wrote:
> Hi, > > Thank you for answer. > > (2014/09/08 12:34), Matt Thomas wrote: >> >> On Sep 7, 2014, at 7:28 PM, Kengo NAKAHARA <[email protected]> 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) > > I see. So, should kcpuset APIs use u_int (not cpuid_t)? As cpu_index() > which is MI function in sys/sys/cpu.h returns u_int type. I don't think it matters since it's a u_long.
