lkml.org 
[lkml]   [2021]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locking: Remove rt_rwlock_is_contended()
On Tue, Sep 07, 2021 at 12:34:58PM +0200, Sebastian Andrzej Siewior wrote:
> rt_rwlock_is_contended() has not users. It makes no sense to use it as
> rwlock_is_contended() because it is a sleeping lock on RT and preemption
> is possible. It reports always != 0 if used by a writer and even if
> there is a waiter then the lock might not be handed over if the
> current owner has the highest priority.

I'm confused now... so first you have two patches that wire up
{spin,rwlock}_is_contended() and how you're arguing we shouldn't do
that?

AFAICT the _is_contended() can still use useful even with preemption,
the typicla use case is a long lock-holder deciding to drop the lock in
order to let someone else in. That still works with preemptible locks,
no?

\
 
 \ /
  Last update: 2021-09-10 18:17    [W:0.089 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site