From aeebe83b0a8fbfa39f84aa714855b61fc4bab043 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 19 Nov 2025 17:49:12 -0500 Subject: kern: proc: Add enhanced processor arbitration Unlike the previouses systems where there was a global arbiter and a shared lock, rv7 derives a zero-based processor index by using the lower 8 bits of the pid MOD the core count. This significantly reduces contention. Signed-off-by: Ian Moffett --- sys/os/os_process.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/os/os_process.c') diff --git a/sys/os/os_process.c b/sys/os/os_process.c index 6bfa220..c80dcc4 100644 --- a/sys/os/os_process.c +++ b/sys/os/os_process.c @@ -43,6 +43,7 @@ process_init(struct process *process, uintptr_t ip, int flags) } process->pid = next_pid; + process->affinity = -1; atomic_inc_64(&next_pid); mu_process_init(process, ip, flags); return 0; -- cgit v1.2.3