lkml.org 
[lkml]   [2019]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH-tip v2 03/12] locking/rwsem: Remove rwsem_wake() wakeup optimization
On Fri, 05 Apr 2019, Waiman Long wrote:

>With the commit 59aabfc7e959 ("locking/rwsem: Reduce spinlock contention
>in wakeup after up_read()/up_write()"), the rwsem_wake() forgoes doing
>a wakeup if the wait_lock cannot be directly acquired and an optimistic
>spinning locker is present. This can help performance by avoiding
>spinning on the wait_lock when it is contended.
>
>With the later commit 133e89ef5ef3 ("locking/rwsem: Enable lockless
>waiter wakeup(s)"), the performance advantage of the above optimization
>diminishes as the average wait_lock hold time become much shorter.
>
>By supporting rwsem lock handoff, we can no longer relies on the fact
>that the presence of an optimistic spinning locker will ensure that the
>lock will be acquired by a task soon. This can lead to missed wakeup
>and application hang. So the commit 59aabfc7e959 ("locking/rwsem:
>Reduce spinlock contention in wakeup after up_read()/up_write()")
>will have to be reverted.
>
>Signed-off-by: Waiman Long <longman@redhat.com>
>---
> kernel/locking/rwsem-xadd.c | 74 -------------------------------------

I very much like removing this code. It was rather crazy.

\
 
 \ /
  Last update: 2019-04-10 20:39    [W:0.098 / U:15.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site