tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Which should kcpuset use cpuid or cpu index?



Hi,

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?

I think kcpuset APIs should use sequentail u_int cpu index because of
efficient and easy-to-understand usage of bitmap. 
Could you comment this idea?

Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index