lkml.org 
[lkml]   [2022]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH -next RFC v2 8/8] sbitmap: wake up the number of threads based on required tags
From
On 4/9/22 00:01, yukuai (C) wrote:
> For the race that new threads are waited after get_wake_nr() and before
> wake_up_nr() in situation (b), I can't figure out how this can be
> problematic [ ... ]

If the atomic_dec_return() statement in __sbq_wake_up() returns a value
that is less than or equal to zero, wake_batch waiters should be woken
up or I/O will hang until sbitmap_queue_wake_all() is called. That last
function should not be called unless there is no alternative.

Thanks,

Bart.

\
 
 \ /
  Last update: 2022-04-12 05:22    [W:0.147 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site