From 50f78ebbe69c8d5e0573b4987d1e7dc21af9779c Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 10 Oct 2025 15:15:47 -0400 Subject: kern/amd64: Attempt to dequeue on a cores first go When a CPU core first starts up, it has no proceses to assign to itself. This commit ensures that the processor will right away start trying to find tasks to grab from its runqueue. Signed-off-by: Ian Moffett --- src/sys/arch/amd64/cpu/cpu_mp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sys/arch/amd64/cpu/cpu_mp.c') diff --git a/src/sys/arch/amd64/cpu/cpu_mp.c b/src/sys/arch/amd64/cpu/cpu_mp.c index d95ba70..ae7b367 100644 --- a/src/sys/arch/amd64/cpu/cpu_mp.c +++ b/src/sys/arch/amd64/cpu/cpu_mp.c @@ -77,6 +77,9 @@ ap_entry(struct limine_smp_info *) corelist[ncores_up - 1] = pcore; atomic_inc_64(&ncores_up); spinlock_release(&lock); + + md_proc_yield(); + __builtin_unreachable(); for (;;); } -- cgit v1.2.3