sched_ext: Count SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE in the right spot
authorTejun Heo <tj@kernel.org>
Sun, 9 Feb 2025 06:39:11 +0000 (20:39 -1000)
committerTejun Heo <tj@kernel.org>
Sun, 9 Feb 2025 06:39:11 +0000 (20:39 -1000)
commit26176116d931621fd96bcef15e7b42a9ddf524da
tree7d281c670bbda8ae59a95b3c7aca12681e9d30a0
parent46a0e1615886b87bdb18cf3f29bf494a30aafc01
sched_ext: Count SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE in the right spot

SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE wasn't quite right in two aspects:

- It counted both migration disabled and offline events.

- It didn't count events from scx_bpf_dsq_move() path.

Fix it by moving the counting into task_can_run_on_remote_rq() which is
shared by both paths and can distinguish the different rejection conditions.
The argument @trigger_error is renamed to @enforce as it now does more than
just triggering error.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Changwoo Min <changwoo@igalia.com>
kernel/sched/ext.c