Il gio 5 gen 2023, 12:35 Stefan Hajnoczi <stefa...@redhat.com> ha scritto:
> On Wed, Jan 04, 2023 at 10:37:34PM +0100, Paolo Bonzini wrote: > > blk_root_drained_end is not thread-safe too. I started looking at that > with > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg925670.html; > that's > > certainly a prerequisite for this patch to be a full fix, but I have not > > checked if it's enough because I don't have the QEMU sources at hand > right > > now. > > Thanks for letting me know. > > Do you think blk_drain_noref() makes sense at all, or should > scsi_purge_requests() avoid calling blk_drain() somehow? > I think it makes sense as a stop gap measure. Perhaps these iothread unrefs could also be changed to happen in a main-loop BH, but I wouldn't rush that. Unref is also the main culprit for functions that end up calling aio_poll from coroutine context (which should be prohibited!) and Kevin was looking at that. Paolo > Stefan >