mirror of
https://github.com/JakeHillion/scx.git
synced 2024-10-29 18:42:19 +00:00
scx_rustland: always dispatch kthreads on the local CPU
Adding extra overhead to any kthread can potentially slow down the entire system, so make sure this never happens by dispatching all kthreads directly on the same local CPU (not just the per-CPU kthreads), bypassing the user-space scheduler. Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
parent
f0ece7af6b
commit
9237e1d835
@ -297,12 +297,12 @@ static bool is_task_cpu_available(struct task_struct *p)
|
||||
struct task_ctx *tctx;
|
||||
|
||||
/*
|
||||
* Always dispatch per-CPU kthread on the same CPU, bypassing the
|
||||
* user-space scheduler (in this way we can to prioritize critical
|
||||
* kernel threads that may potentially slow down the entire system if
|
||||
* they are blocked for too long).
|
||||
* Always dispatch kthread on the same CPU, bypassing the user-space
|
||||
* scheduler (in this way we can to prioritize critical kernel threads
|
||||
* that may potentially slow down the entire system if they are blocked
|
||||
* for too long).
|
||||
*/
|
||||
if (is_kthread(p) && p->nr_cpus_allowed == 1)
|
||||
if (is_kthread(p))
|
||||
return true;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user