qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart
@ 2020-06-03  9:32 Sergio Lopez
  2020-06-03  9:32 ` [PATCH 1/2] virtio-blk: Refactor the code that processes queued requests Sergio Lopez
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sergio Lopez @ 2020-06-03  9:32 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Sergio Lopez, Michael S. Tsirkin,
	Max Reitz, Stefan Hajnoczi

On restart, we were scheduling a BH to process queued requests, which
would run before starting up the data plane, leading to those requests
being assigned and started on coroutines on the main context.

This could cause requests to be wrongly processed in parallel from
different threads (the main thread and the iothread managing the data
plane), potentially leading to multiple issues.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1812765

See "virtio-blk: Disable request queuing while switching contexts" for
previous discussion:

 - https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00304.html

Sergio Lopez (2):
  virtio-blk: Refactor the code that processes queued requests
  virtio-blk: On restart, process queued requests in the proper context

 include/hw/virtio/virtio-blk.h  |  1 +
 hw/block/dataplane/virtio-blk.c |  8 ++++++++
 hw/block/virtio-blk.c           | 30 +++++++++++++++++++++---------
 3 files changed, 30 insertions(+), 9 deletions(-)

-- 
2.26.2




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

end of thread, other threads:[~2020-06-03 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03  9:32 [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart Sergio Lopez
2020-06-03  9:32 ` [PATCH 1/2] virtio-blk: Refactor the code that processes queued requests Sergio Lopez
2020-06-03  9:32 ` [PATCH 2/2] virtio-blk: On restart, process queued requests in the proper context Sergio Lopez
2020-06-03 14:14 ` [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart Kevin Wolf

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).