scx_rustland: remove SCX_ENQ_LAST check in is_task_cpu_available()

With commit 49f2e7c ("scx_rustland: enable SCX_OPS_ENQ_LAST") we have
enabled SCX_OPS_ENQ_LAST that seems to save some unnecessary user-space
scheduler activations when the system is mostly idle.

We are also checking for the SCX_ENQ_LAST in the enqueue flags, that
apparently it is not needed and we can achieve the same behavior
dropping this check.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Andrea Righi 2024-01-01 01:33:54 +01:00
parent 840260141d
commit 0fc46b2be2

View File

@ -335,12 +335,6 @@ static bool is_task_cpu_available(struct task_struct *p, u64 enq_flags)
if (is_kthread(p) && p->scx.slice > slice_ns / 2)
return true;
/*
* No scheduling required if it's the last task running.
*/
if (enq_flags & SCX_ENQ_LAST)
return true;
/*
* For regular tasks always rely on force_local to determine if we can
* bypass the scheduler.