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. > 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 <[email protected]> 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? call_rcu_thread() still waits for the BQL to be dropped somewhere, so from the perspective of the coroutine, it will definitely be dropped during the yield. So if this was your intention, the change probably makes sense, but the description could be clearer. Took me a bit to understand what this is really doing. Kevin
