All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] locking: Provide {rwlock|spin}_is_contended on PREEMPT_RT
@ 2021-09-06 14:30 Sebastian Andrzej Siewior
  2021-09-06 14:30 ` [PATCH 1/2] locking: Wire up rwlock_is_contended() " Sebastian Andrzej Siewior
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-09-06 14:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Will Deacon, Waiman Long,
	Boqun Feng, Thomas Gleixner

The lkp bot reported that rt_rwlock_is_contended() is not used so I
looked closer.

#1 wires up rwlock_is_contended() with rt_rwlock_is_contended() as it
was probably intended. As noted in the patch description, a writer
will always see true based on the current implementation. This could be
solved by looking at the waiters of the rtmutex underneath as done in #2
for spin_lock (which is missing). The helper is not exported and would
be also needed for rwsem_is_contended() because it is using the same
rw_base_is_contended() implementation.

Maybe it is not worth the trouble given that on PREEMPT_RT the rwlock/
spinlock is preemptible so it might be just best to return false and
wait for the scheduler to do its magic.

Sebastian



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-13 11:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 14:30 [PATCH 0/2] locking: Provide {rwlock|spin}_is_contended on PREEMPT_RT Sebastian Andrzej Siewior
2021-09-06 14:30 ` [PATCH 1/2] locking: Wire up rwlock_is_contended() " Sebastian Andrzej Siewior
2021-09-06 14:30 ` [PATCH 2/2] locking: Provide spin_is_contended() " Sebastian Andrzej Siewior
2021-09-07 10:09 ` [PATCH 0/2] locking: Provide {rwlock|spin}_is_contended " Sebastian Andrzej Siewior
2021-09-07 10:34   ` [PATCH] locking: Remove rt_rwlock_is_contended() Sebastian Andrzej Siewior
2021-09-10 16:16     ` Peter Zijlstra
2021-09-10 16:37       ` Sebastian Andrzej Siewior
2021-09-13 11:20         ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.