From 732ba4900bc8d14a3f1a17fa30d944388bbc728e Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Mon, 8 Jan 2024 08:39:34 +0100 Subject: [PATCH] scx_rustland: avoid using SCX_ENQ_PREEMPT With the introduction of a the dynamic time slice that scales down based on the number of tasks in the system, there is no obvious benefit in utilizing SCX_ENQ_PREEMPT to dispatch the user-space scheduler. The reduced time slice as the task count increases already enhances the user-space scheduler's opportunities to run and efficiently manage scheduling tasks, even when the system is massively overloaded. Signed-off-by: Andrea Righi --- scheds/rust/scx_rustland/src/bpf/main.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheds/rust/scx_rustland/src/bpf/main.bpf.c b/scheds/rust/scx_rustland/src/bpf/main.bpf.c index d6f5b98..4221979 100644 --- a/scheds/rust/scx_rustland/src/bpf/main.bpf.c +++ b/scheds/rust/scx_rustland/src/bpf/main.bpf.c @@ -461,7 +461,7 @@ static void dispatch_user_scheduler(s32 cpu) scx_bpf_error("Failed to find usersched task %d", usersched_pid); return; } - dispatch_task(p, cpu, SCX_ENQ_PREEMPT); + dispatch_task(p, cpu, 0); __sync_fetch_and_add(&nr_kernel_dispatches, 1); bpf_task_release(p); }