]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: improve WAKE_SYNC behavior for default idle CPU selection
authorAndrea Righi <andrea.righi@linux.dev>
Fri, 18 Oct 2024 18:09:51 +0000 (20:09 +0200)
committerTejun Heo <tj@kernel.org>
Fri, 18 Oct 2024 20:26:22 +0000 (10:26 -1000)
commit21b8964826c4da3cc8ed89308f8838cfd221429f
tree24e9d12ce9a6bdc88aa48309b25c800d9186aac1
parentba1c9d327e7ffb7b931fc2b5209aae532ffee5a5
sched_ext: improve WAKE_SYNC behavior for default idle CPU selection

In the sched_ext built-in idle CPU selection logic, when handling a
WF_SYNC wakeup, we always attempt to migrate the task to the waker's
CPU, as the waker is expected to yield the CPU after waking the task.

However, it may be preferable to keep the task on its previous CPU if
the waker's CPU is cache-affine.

The same approach is also used by the fair class and in other scx
schedulers, like scx_rusty and scx_bpfland.

Therefore, apply the same logic to the built-in idle CPU selection
policy as well.

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c