lkml.org 
[lkml]   [2022]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/13] locking/qspinlock: paravirt use simple trylock in case idx overflows
Date
The mcs node overflow fallback locking case does not have to use
pv_hybrid_queued_unfair_trylock as the trylock, which reduces the
differences between pv and !pv cases.

This was likely an artifact of function renaming making it use the pv
trylock, which is not a bug but it is unexpected.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
kernel/locking/qspinlock.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index 1d5b3443772c..cef0ca7d94e1 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -798,13 +798,8 @@ static inline void queued_spin_lock_mcs_queue(struct qspinlock *lock, bool parav
*/
if (unlikely(idx >= MAX_NODES)) {
lockevent_inc(lock_no_node);
- if (paravirt) {
- while (!pv_hybrid_queued_unfair_trylock(lock))
- cpu_relax();
- } else {
- while (!queued_spin_trylock(lock))
- cpu_relax();
- }
+ while (!queued_spin_trylock(lock))
+ cpu_relax();
goto release;
}

--
2.35.1
\
 
 \ /
  Last update: 2022-07-04 16:40    [W:0.314 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site