Skip to content

Pin kmain contexts

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

This will use the newly-added sched_affinity functionality, in order to pin context ID cpu_id+1 to CPU ID cpu_id. Additionally, it sets the minimum context id to cpu_count + 1.

Maybe the kmain contexts should move their IDs to usize::MAX - cpu_count + cpu_id, or keep them as contexts but remove them from the context table, and handle them separately in the scheduler.

I haven't tested if this fixes #111 (closed), maybe that should be checked before merge.

Merge request reports