lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] locking/rwsem: Wake up all readers for wait queue waker
From
On 2/13/23 22:09, Hillf Danton wrote:
> On Mon, 13 Feb 2023 14:48:32 -0500 Waiman Long <longman@redhat.com>
>>
>> @@ -1281,7 +1282,7 @@ static struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
>> raw_spin_lock_irqsave(&sem->wait_lock, flags);
>>
>> if (!list_empty(&sem->wait_list))
>> - rwsem_mark_wake(sem, RWSEM_WAKE_READ_OWNED, &wake_q);
>> + rwsem_mark_wake(sem, RWSEM_WAKE_READ_OWNED, &wake_q, false);
>>
>> raw_spin_unlock_irqrestore(&sem->wait_lock, flags);
>> wake_up_q(&wake_q);
>> --
>> 2.31.1
> Downgrade is conceptually the right time to let all read waiters go
> regardless write waiter.

Still, a downgraded task is still in the read critical section and we
shouldn't introduce arbitrary latency to that. Let's focus on the easy
one and we can discuss about other possibility later.

Thanks,
Longman

\
 
 \ /
  Last update: 2023-03-27 00:26    [W:0.093 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site