Commit f207dc2
committed
sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether ->select_task_rq() was called
During ttwu, ->select_task_rq() can be skipped if only one CPU is allowed or
migration is disabled. sched_ext schedulers may perform operations such as
direct dispatch from ->select_task_rq() path and it is useful for them to
know whether ->select_task_rq() was skipped in the ->enqueue_task() path.
Currently, sched_ext schedulers are using ENQUEUE_WAKEUP for this purpose
and end up assuming incorrectly that ->select_task_rq() was called for tasks
that are bound to a single CPU or migration disabled.
Make select_task_rq() indicate whether ->select_task_rq() was called by
setting WF_RQ_SELECTED in *wake_flags and make ttwu_do_activate() map that
to ENQUEUE_RQ_SELECTED for ->enqueue_task().
This will be used by sched_ext to fix ->select_task_rq() skip detection.
Signed-off-by: Tejun Heo <[email protected]>
Acked-by: David Vernet <[email protected]>1 parent b62933e commit f207dc2
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3522 | 3522 | | |
3523 | 3523 | | |
3524 | 3524 | | |
3525 | | - | |
| 3525 | + | |
3526 | 3526 | | |
3527 | | - | |
| 3527 | + | |
| 3528 | + | |
3528 | 3529 | | |
| 3530 | + | |
3529 | 3531 | | |
3530 | 3532 | | |
3531 | 3533 | | |
| |||
3659 | 3661 | | |
3660 | 3662 | | |
3661 | 3663 | | |
| 3664 | + | |
| 3665 | + | |
3662 | 3666 | | |
3663 | 3667 | | |
3664 | 3668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2292 | 2292 | | |
2293 | 2293 | | |
2294 | 2294 | | |
| 2295 | + | |
2295 | 2296 | | |
2296 | 2297 | | |
2297 | 2298 | | |
| |||
2334 | 2335 | | |
2335 | 2336 | | |
2336 | 2337 | | |
| 2338 | + | |
2337 | 2339 | | |
2338 | 2340 | | |
2339 | 2341 | | |
| |||
2360 | 2362 | | |
2361 | 2363 | | |
2362 | 2364 | | |
| 2365 | + | |
2363 | 2366 | | |
2364 | 2367 | | |
2365 | 2368 | | |
| |||
0 commit comments