tech-kern archive

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

Re: Which should kcpuset use cpuid or cpu index?



Hi,

(2014/09/08 12:52), Matt Thomas wrote:

On Sep 7, 2014, at 8:51 PM, Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost> 
wrote:
(2014/09/08 12:34), Matt Thomas wrote:

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.

Surely, it does not matter for compile time and run time. But reading
source, it causes confusion as if kcpuset APIs use cpuid. In fact,
as you indicated, the APIs use cpu index.

I think it would avoid misunderstanding to use u_int for kcpuset APIs.
# It would be friendly to novice like me :)

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