scx_rustland_core: temporarily drop RL_PREEMPT_CPU

Temporarily drop the RL_PREEMPT_CPU flag, we need a better way to
implement preemption in scx_rustland_core and it's not very effective at
the moment, so simply it drop it for now (it'll be re-added later in the
future in a proper way).

This change does not affect any scheduler, since RL_PREEMPT_CPU is
currently unused.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
This commit is contained in:
Andrea Righi 2024-08-26 15:53:06 +02:00
parent bf67b83561
commit 2ee07bb1fb
3 changed files with 1 additions and 15 deletions

View File

@ -53,10 +53,6 @@ const SCHED_EXT: i32 = 7;
#[allow(dead_code)]
pub const RL_CPU_ANY: u64 = bpf_intf::RL_CPU_ANY as u64;
// Allow to preempt the target CPU when dispatching the task.
#[allow(dead_code)]
pub const RL_PREEMPT_CPU: u64 = bpf_intf::RL_PREEMPT_CPU as u64;
/// High-level Rust abstraction to interact with a generic sched-ext BPF component.
///
/// Overview

View File

@ -54,11 +54,6 @@ enum {
* on the first CPU available.
*/
RL_CPU_ANY = 1 << 0,
/*
* Allow to preempt the target CPU when dispatching the task.
*/
RL_PREEMPT_CPU = 1 << 1,
};
/*

View File

@ -683,12 +683,7 @@ static long handle_dispatched_task(struct bpf_dynptr *dynptr, void *context)
dbg_msg("usersched: pid=%d cpu=%d cpumask_cnt=%llu slice_ns=%llu flags=%llx",
task->pid, task->cpu, task->cpumask_cnt, task->slice_ns, task->flags);
/*
* Map RL_PREEMPT_CPU to SCX_ENQ_PREEMPT and allow this task to
* preempt others.
*/
if (task->flags & RL_PREEMPT_CPU)
enq_flags = SCX_ENQ_PREEMPT;
/*
* Check whether the user-space scheduler assigned a different
* CPU to the task and migrate (if possible).