Skip to content

Set IA32_TSC_AUX and add a logical CPU ID newtype

Jacob Lorentzon requested to merge 4lDO2/kernel:cpu_ids into master

This wraps logical CPU IDs (as opposed to hardware CPU IDs, even though these are currently 1:1) into a newtype, based on u32 instead of usize (u16 would most likely be more than sufficient; it looks like Linux's hard upper limit is 8192 CPUs). sched_affinity is extended into a bitmask. The max CPU count on Redox is currently set to 128 CPUs, although expanding it to 256 would be possible w/o heap allocation, and above that, w/heap allocation.

LogicalCpuId can perhaps be optimized away if multi_core is disabled.

It's not currently possible to specify a full sched_affinity mask, as that would require relibc changes, but it can be implemented soon.

Merge request reports