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

From
Logan Gunthorpe <logang@deltatee.com>
Date
2020-03-18 22:28:56
Also in
linux-pci, linux-usb, linux-wireless, linuxppc-dev, lkml
Reply to
Thomas Gleixner, 2020-03-18

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
Thread (72 messages) 72 messages, 17 authors, last reply 2020-03-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help