qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4] virtio-scsi: restart DMA after iothread
Date: Mon, 17 Jun 2019 14:29:22 +0200	[thread overview]
Message-ID: <20190617122922.GG7397@linux.fritz.box> (raw)
In-Reply-To: <20190612120421.20336-1-stefanha@redhat.com>

Am 12.06.2019 um 14:04 hat Stefan Hajnoczi geschrieben:
> When the 'cont' command resumes guest execution the vm change state
> handlers are invoked.  Unfortunately there is no explicit ordering
> between vm change state handlers.  When two layers of code both use vm
> change state handlers, we don't control which handler runs first.
> 
> virtio-scsi with iothreads hits a deadlock when a failed SCSI command is
> restarted and completes before the iothread is re-initialized.
> 
> This patch introduces priorities for VM change state handlers so the
> IOThread is guaranteed to be initialized before DMA requests are
> restarted.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> v4:
> Paolo and Michael were interested in a priorities system.  Kevin wasn't
> convinced.  Here is a patch implementing the priorities approach so you
> can decide whether you prefer this or not.

I still prefer the v3 approach that reflects the actual dependencies in
the code. With the priorities approach, we try to represent a tree of
devices (a structure we already have) with an additional flat list of
numbers. While these numbers can actually provide all the information
that we need in practice in this specific case, it still feels a bit
hacky and might not be extensible to future cases.

But in the end, if Paolo feels strongly that for whatever reason
propagating events through the real device tree isn't good, let's get
the bug fixed with whatever hack it takes.

Kevin


  parent reply	other threads:[~2019-06-17 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:04 [Qemu-devel] [PATCH v4] virtio-scsi: restart DMA after iothread Stefan Hajnoczi
2019-06-12 12:32 ` Paolo Bonzini
2019-06-12 14:06 ` no-reply
2019-06-17 12:29 ` Kevin Wolf [this message]
2019-06-17 17:23   ` Paolo Bonzini
2019-06-17 17:58     ` Kevin Wolf
2019-06-17 18:27       ` Paolo Bonzini
2019-06-20 16:18         ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190617122922.GG7397@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=fam@euphon.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).