On Tue, 12 Sept 2023 at 12:37, Kevin Wolf <kw...@redhat.com> wrote: > > Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > > call_drain_rcu() has limitations that make it unsuitable for use in > > qmp_device_add(). > > This sounds a bit vague with only alluding to some unnamed limitations. > I assume that you mean the two points you add to rcu.txt. If so, maybe > it would be better to add a reference to that in the commit message.
Yes, exactly. I will add a reference to the commit message. > > > Introduce a new coroutine version of drain_call_rcu() > > with the same functionality but that does not drop the BQL. The next > > patch will use it to fix qmp_device_add(). > > > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > > I don't understand the reasoning here. How does yielding from the > coroutine not effectively release the BQL, too? It's just that you won't > have explicit code here, but the mainloop will do it for you while > waiting for new events. > > Is this about not dropping the BQL specifically in nested event loops, > but letting the coroutine wait until we return to the real main loop > where dropping the BQL is hopefully not a problem? Yes. Stefan