# Re: \[patch V2 11/15\] completion: Use simple wait queues

- From: Logan Gunthorpe \<logang@deltatee.com\>
- Date: 2020-03-18 22:28:56 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2020/03/5899576
- Thread: https://ratatoskr.run/linux-pci/2020/03/5899327/t.md

```text


On 2020-03-18 2:43 p.m., Thomas Gleixner wrote:
> There is no semantical or functional change:
> 
>   - completions use the exclusive wait mode which is what swait provides
> 
>   - complete() wakes one exclusive waiter
> 
>   - complete_all() wakes all waiters while holding the lock which protects
>     the wait queue against newly incoming waiters. The conversion to swait
>     preserves this behaviour.
> 
> complete_all() might cause unbound latencies with a large number of waiters
> being woken at once, but most complete_all() usage sites are either in
> testing or initialization code or have only a really small number of
> concurrent waiters which for now does not cause a latency problem. Keep it
> simple for now.

Seems like it would be worth adding a note for this to the
complete_all() doc string. Otherwise developers will not likely find out
about this issue and may not keep it as simple as you'd like.

Logan
```
