Commit 60e339b
sched_ext: Remove unnecessary cpu_relax()
As described in commit b07996c ("sched_ext: Don't hold
scx_tasks_lock for too long"), we're doing a cond_resched() every 32
calls to scx_task_iter_next() to avoid RCU and other stalls. That commit
also added a cpu_relax() to the codepath where we drop and reacquire the
lock, but as Waiman described in [0], cpu_relax() should only be
necessary in busy loops to avoid pounding on a cacheline (or to allow a
hypertwin to more fully utilize a core).
Let's remove the unnecessary cpu_relax().
[0]: https://lore.kernel.org/all/[email protected]/
Cc: Waiman Long <[email protected]>
Signed-off-by: David Vernet <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>1 parent b07996c commit 60e339b
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1374 | 1374 | | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | | - | |
1378 | 1377 | | |
1379 | 1378 | | |
1380 | 1379 | | |
| |||
0 commit comments