diff options
author | Peter Zijlstra <[email protected]> | 2021-06-30 17:35:18 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2021-07-07 13:53:24 +0200 |
commit | 048661a1f963e9517630f080687d48af79ed784c (patch) | |
tree | b5850f9221b6f8ff66f79b19645c82a2f02d1124 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | ab4e4d9f79b2c95ef268985d2a9625a03a73c49a (diff) |
locking/mutex: Fix HANDOFF condition
Yanfei reported that setting HANDOFF should not depend on recomputing
@first, only on @first state. Which would then give:
if (ww_ctx || !first)
first = __mutex_waiter_is_first(lock, &waiter);
if (first)
__mutex_set_flag(lock, MUTEX_FLAG_HANDOFF);
But because 'ww_ctx || !first' is basically 'always' and the test for
first is relatively cheap, omit that first branch entirely.
Reported-by: Yanfei Xu <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Waiman Long <[email protected]>
Reviewed-by: Yanfei Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions