From d2275fbf73f55e202d8e64726d8b5c23b70b15b0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 19 May 2025 00:50:54 -0400 Subject: kernel: sched: Rewrite context switch logic Simplify and improve context switch logic, also stops the LAPIC from being spammed with register accesses. This also updates the default quantum to 9000 us to avoid cache thrashing and all kinds of other nasty things. Signed-off-by: Ian Moffett --- sys/include/sys/schedvar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/include') diff --git a/sys/include/sys/schedvar.h b/sys/include/sys/schedvar.h index 509e2c9..5ed9f5f 100644 --- a/sys/include/sys/schedvar.h +++ b/sys/include/sys/schedvar.h @@ -36,7 +36,7 @@ #include #if defined(_KERNEL) -#define DEFAULT_TIMESLICE_USEC 500 +#define DEFAULT_TIMESLICE_USEC 9000 #define SHORT_TIMESLICE_USEC 10 #define SCHED_POLICY_MLFQ 0x00U /* Multilevel feedback queue */ -- cgit v1.2.3