Skip to content

RFC Fix some jobs/drain/aio_poll related hangs

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5blockjob: Wake up BDS when job becomes idleblockjob.c include/block/blockjob.h include/qemu/job.h +1 more+41 -00 replies
2/5tests: Acquire AioContext around job_finish_sync()include/qemu/job.h tests/test-bdrv-drain.c tests/test-blockjob.c+18 -01 reply
3/5job: Drop AioContext lock around aio_poll()job.c+3 -02 replies
4/5block: Drop AioContext lock in bdrv_drain_poll_top_level()block/io.c+24 -12 replies
5/5Lock AioContext in bdrv_co_drain_bh_cb()block/io.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH 0/5] Fix some jobs/drain/aio_poll related hangs

I'm running out of time and will be offline for the next two weeks, so I'm just sending out what I have right now. This is probably not ready to be merged yet, but if need be, someone else can pick it up. Otherwise I'll do that myself when I return.

This is related to the following bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=1614623
https://bugzilla.redhat.com/show_bug.cgi?id=1601212

Essentially it tries to fix a few deadlocks into which we run when running two commit jobs (probably just one example for problematic scenarios) on nodes that are in a non-mainloop AioContext (i.e. with dataplane).

Obviously, besides verifying that the code changes are actually correct as they are, we also want to add some test cases for this. I suppose test-bdrv-drain should test for the individual bugs, and a qemu-iotests case could try the higher level scenario of multiple commit jobs with dataplane.

Kevin Wolf (5):
blockjob: Wake up BDS when job becomes idle
tests: Acquire AioContext around job_finish_sync()
job: Drop AioContext lock around aio_poll()
block: Drop AioContext lock in bdrv_drain_poll_top_level() [WIP] Lock AioContext in bdrv_co_drain_bh_cb()

 include/block/blockjob.h | 13 +++++++++++++
 include/qemu/job.h       |  9 +++++++++
 block/io.c               | 31 ++++++++++++++++++++++++++++++-
 blockjob.c               | 18 ++++++++++++++++++
 job.c                    | 10 ++++++++++
 tests/test-bdrv-drain.c  |  6 ++++++
 tests/test-blockjob.c    |  6 ++++++
 7 files changed, 92 insertions(+), 1 deletion(-)
Signature · 1 line
2.13.6