[pve-devel] [PATCH qemu 5/7] add patch to disable graph locking
Fiona Ebner
f.ebner at proxmox.com
Fri Oct 6 12:23:14 CEST 2023
Am 28.09.23 um 14:59 schrieb Fiona Ebner:
> + void bdrv_graph_wrlock(BlockDriverState *bs)
> + {
> + AioContext *ctx = NULL;
> +
> + GLOBAL_STATE_CODE();
> ++ /*
> ++ * TODO Some callers hold an AioContext lock when this is called, which
> ++ * causes deadlocks. Reenable once the AioContext locking is cleaned up (or
> ++ * AioContext locks are gone).
> ++ */
> ++#if 0
> + assert(!qatomic_read(&has_writer));
> ++#endif
> +
> + /*
> + * Release only non-mainloop AioContext. The mainloop often relies on the
> +@@ -126,6 +137,7 @@ void bdrv_graph_wrlock(BlockDriverState *bs)
> + }
> + }
> +
> ++#if 0
> + /* Make sure that constantly arriving new I/O doesn't cause starvation */
> + bdrv_drain_all_begin_nopoll();
> +
> +@@ -154,6 +166,7 @@ void bdrv_graph_wrlock(BlockDriverState *bs)
> + } while (reader_count() >= 1);
> +
> + bdrv_drain_all_end();
> ++#endif
> +
> + if (ctx) {
> + aio_context_acquire(bdrv_get_aio_context(bs));
I missed that there was another commit in between, so the #ifdeffery
doesn't get rid of the part releasing+acquiring the AioContext lock.
Should not be a real issue, but who knows.
I'll send a v2 to make it proper (and also want to pick another stable fix).
More information about the pve-devel
mailing list