Messages in this thread | | | Date | Mon, 11 Apr 2022 20:20:32 -0700 | Subject | Re: [PATCH -next RFC v2 8/8] sbitmap: wake up the number of threads based on required tags | From | Bart Van Assche <> |
| |
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.
| |