]> Git Repo - linux.git/commit
sched_ext: Unify regular and core-sched pick task paths
authorTejun Heo <[email protected]>
Wed, 4 Sep 2024 07:54:29 +0000 (21:54 -1000)
committerTejun Heo <[email protected]>
Wed, 4 Sep 2024 07:54:29 +0000 (21:54 -1000)
commit753e2836d139b43ab535718c5f17c73c284bb299
tree6f964135feb5ed9fda36060818bb3bc75d5ab93e
parent8b1451f2f723f845c05b8bad3d4c45de284338b5
sched_ext: Unify regular and core-sched pick task paths

Because the BPF scheduler's dispatch path is invoked from balance(),
sched_ext needs to invoke balance_one() on all sibling rq's before picking
the next task for core-sched.

Before the recent pick_next_task() updates, sched_ext couldn't share pick
task between regular and core-sched paths because pick_next_task() depended
on put_prev_task() being called on the current task. Tasks currently running
on sibling rq's can't be put when one rq is trying to pick the next task, so
pick_task_scx() had to have a separate mechanism to pick between a sibling
rq's current task and the first task in its local DSQ.

However, with the preceding updates, pick_next_task_scx() no longer depends
on the current task being put and can compare the current task and the next
in line statelessly, and the pick task logic should be shareable between
regular and core-sched paths.

Unify regular and core-sched pick task paths:

- There's no reason to distinguish local and sibling picks anymore. @local
  is removed from balance_one().

- pick_next_task_scx() is turned into pick_task_scx() by dropping the
  put_prev_set_next_task() call.

- The old pick_task_scx() is dropped.

Signed-off-by: Tejun Heo <[email protected]>
kernel/sched/ext.c
This page took 0.05448 seconds and 4 git commands to generate.