diff options
| author | Tejun Heo <[email protected]> | 2025-05-21 22:23:06 +0000 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2025-05-22 19:25:15 +0000 |
| commit | 273cc949655c70001778eb0b9e7db993df845912 (patch) | |
| tree | ae3f254ba1c83e9be7f0da01ba92f774a06dc07d /drivers/gpu/drm/amd/amdgpu/atom.c | |
| parent | sched_ext, docs: convert mentions of "CFS" to "fair-class scheduler" (diff) | |
| download | kernel-273cc949655c70001778eb0b9e7db993df845912.tar.gz kernel-273cc949655c70001778eb0b9e7db993df845912.zip | |
sched_ext: Call ops.update_idle() after updating builtin idle bits
BPF schedulers that use both builtin CPU idle mechanism and
ops.update_idle() may want to use the latter to create interlocking between
ops.enqueue() and CPU idle transitions so that either ops.enqueue() sees the
idle bit or ops.update_idle() sees the task queued somewhere. This can
prevent race conditions where CPUs go idle while tasks are waiting in DSQs.
For such interlocking to work, ops.update_idle() must be called after
builtin CPU masks are updated. Relocate the invocation. Currently, there are
no ordering requirements on transitions from idle and this relocation isn't
expected to make meaningful differences in that direction.
This also makes the ops.update_idle() behavior semantically consistent:
any action performed in this callback should be able to override the
builtin idle state, not the other way around.
Signed-off-by: Tejun Heo <[email protected]>
Reviewed-and-tested-by: Andrea Righi <[email protected]>
Acked-by: Changwoo Min <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atom.c')
0 files changed, 0 insertions, 0 deletions
