diff options
| author | David Vernet <[email protected]> | 2024-10-14 17:58:30 +0000 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2024-10-14 23:23:49 +0000 |
| commit | 60e339be100d7d49e13616bd8b4b1b864f0a64a0 (patch) | |
| tree | 0abc72d60145c53ea2b4a3d82199dc3257f3e840 /rust/helpers/helpers.c | |
| parent | sched_ext: Don't hold scx_tasks_lock for too long (diff) | |
| download | kernel-60e339be100d7d49e13616bd8b4b1b864f0a64a0.tar.gz kernel-60e339be100d7d49e13616bd8b4b1b864f0a64a0.zip | |
sched_ext: Remove unnecessary cpu_relax()
As described in commit b07996c7abac ("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]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
