From: Kevin Wolf <kwolf@redhat.com>
To: Tony Asleson <tasleson@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC 0/4] POC: Generating realistic block errors
Date: Mon, 30 Sep 2019 16:54:54 +0200 [thread overview]
Message-ID: <20190930145454.GA12777@linux.fritz.box> (raw)
In-Reply-To: <4d1d6516-fc4a-6258-e993-452f92cdfa28@redhat.com>
Am 20.09.2019 um 20:55 hat Tony Asleson geschrieben:
> On 9/20/19 1:11 PM, Kevin Wolf wrote:
> > Emitting a QMP event when blkdebug injects an error makes sense to me.
> >
> > I wouldn't use it for this case, though, because this would become racy.
> > It could happen that the guest writes to the image, which sends a QMP
> > event, and then reads before the external program has removed the error.
>
> My POC had a single lock protecting it's shared state. I'm kind of
> surprised no one jumped on that because it's a big point of lock
> contention.
I think people didn't review the code in detail because we're still
discussing very high-level design questions.
Anyway, I did mention that I'd like to get your code out of the way for
the fast path when the feature isn't used. If the user explicitly
enabled the feature and we're basically in a debugging setup, the lock
contention should be acceptable. In fact, the mutex might not even be
necessary because the code should be covered by the AioContext lock.
However, I don't see how this locking could fix the race I mention. It's
not a race between two QEMU components, but between the guest and a QMP
client. A mutex in QEMU certainly feels like the wrong way to address
it.
If you really wanted an external process to control this, you would have
to fully stop the VM whenever an error is injected and only continue it
via QMP after the QMP client has decided whether or not to disable the
error. Because you'd need a custom QMP client then, you wouldn't be able
to use things like libvirt for such QEMU instances.
Kevin
next prev parent reply other threads:[~2019-09-30 14:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 19:48 [RFC 0/4] POC: Generating realistic block errors Tony Asleson
2019-09-19 19:48 ` [RFC 1/4] Add qapi for block error injection Tony Asleson
2019-09-20 9:03 ` Philippe Mathieu-Daudé
2019-09-20 15:17 ` Tony Asleson
2019-09-19 19:48 ` [RFC 2/4] SCSI media error reporting Tony Asleson
2019-09-19 19:48 ` [RFC 3/4] NVMe " Tony Asleson
2019-09-19 19:48 ` [RFC 4/4] ahci " Tony Asleson
2019-09-19 20:43 ` John Snow
2019-09-19 21:49 ` Tony Asleson
2019-09-20 17:22 ` John Snow
2019-09-20 8:43 ` Kevin Wolf
2019-09-20 16:18 ` John Snow
2019-09-20 19:25 ` Tony Asleson
2019-09-20 19:29 ` John Snow
2019-09-20 8:36 ` [RFC 0/4] POC: Generating realistic block errors Kevin Wolf
2019-09-20 16:41 ` Tony Asleson
2019-09-20 17:08 ` Eric Blake
2019-09-20 19:15 ` Tony Asleson
2019-09-20 18:11 ` Kevin Wolf
2019-09-20 18:55 ` Tony Asleson
2019-09-30 14:54 ` Kevin Wolf [this message]
2019-09-20 9:22 ` Stefan Hajnoczi
2019-09-20 17:28 ` Tony Asleson
2019-11-14 15:47 ` Tony Asleson
2019-11-21 10:30 ` Stefan Hajnoczi
2019-11-21 11:12 ` Kevin Wolf
2019-11-26 18:19 ` Tony Asleson
2019-11-26 19:28 ` Kevin Wolf
2019-09-20 9:25 ` Stefan Hajnoczi
2019-09-20 14:41 ` no-reply
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=20190930145454.GA12777@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tasleson@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).