qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] block: Do not poll in bdrv_set_aio_context_ignore() when acquiring new_context
@ 2021-07-12  5:38 Zhiyong Ye
  2021-07-12  5:38 ` [PATCH 1/1] " Zhiyong Ye
  0 siblings, 1 reply; 4+ messages in thread
From: Zhiyong Ye @ 2021-07-12  5:38 UTC (permalink / raw)
  To: qemu-block, qemu-devel; +Cc: kwolf, Zhiyong Ye, mreitz

When bdrv_set_aio_context_ignore() is called in the main loop to change
the AioContext onto the IO thread, the bdrv_drain_invoke_entry() never
gets to run and the IO thread hangs at co_schedule_bh_cb().

This is because the AioContext is occupied by the main thread after
being attached to the IO thread, and the main thread poll in
bdrv_drained_end() waiting for the IO request to be drained, but the IO
thread cannot acquire the AioContext, which leads to deadlock.

Zhiyong Ye (1):
  block: Do not poll in bdrv_set_aio_context_ignore() when acquiring new_context

 block.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.11.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-20 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-12  5:38 [PATCH 0/1] block: Do not poll in bdrv_set_aio_context_ignore() when acquiring new_context Zhiyong Ye
2021-07-12  5:38 ` [PATCH 1/1] " Zhiyong Ye
2021-07-19 10:24   ` Kevin Wolf
2021-07-20 13:07     ` Zhiyong Ye

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).