From: Kevin Wolf <kwolf@redhat.com>
To: "Busch, Keith" <keith.busch@intel.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Keith Busch" <keith.busch@gmail.com>,
"Hannes Reinecke" <hare@suse.de>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] NVMe: Initial commit to add an NVM Express device
Date: Thu, 13 Dec 2012 10:12:44 +0100 [thread overview]
Message-ID: <50C99C0C.80704@redhat.com> (raw)
In-Reply-To: <B58D82457FDA0744A320A2FC5AC253B9162D174B@FMSMSX105.amr.corp.intel.com>
Am 13.12.2012 01:13, schrieb Busch, Keith:
> On Mon, Dec 10, 2012 at 7:11 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> Quick pointers to get started on Kevin's suggestion:
>>
>> bdrv_aio_readv(), bdrv_aio_writev(), bdrv_aio_flush(), and
>> bdrv_aio_discard() provide the block device operations that emulated
>> storage controllers use.
>
> There seems to be an issue with the bdrv_aio_[readv/writev] routines. I added some additional tracing in the block and coroutine code, and well, long story short, the coroutine "bdrv_co_io_em" needs to call "qemu_coroutine_yield" before his aio callback "bdrv_co_io_em_complete" invokes "qemu_coroutine_enter". It does not always win this race in my experiments, and qemu aborts with a recursive re-entry error. I don't know this coroutine code well enough to propose a fix -- I'd say maybe use locks but I think that defeats the purpose of using coroutines if I understand them correctly?
The block layer, like most other qemu functions, is supposed to run
under the qemu_global_mutex (also called BQL). Do you call into it from
a different thread that doesn't take this lock?
Kevin
next prev parent reply other threads:[~2012-12-13 9:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-08 0:05 [Qemu-devel] [PATCH] NVMe: Initial commit to add an NVM Express device Keith Busch
2012-12-08 7:38 ` Stefan Weil
2012-12-08 7:52 ` Stefan Weil
2012-12-08 17:59 ` Andreas Färber
2012-12-08 19:20 ` Keith Busch
2012-12-08 20:59 ` Andreas Färber
2012-12-10 12:36 ` Kevin Wolf
2012-12-10 14:11 ` Stefan Hajnoczi
2012-12-10 16:28 ` Busch, Keith
2012-12-13 0:13 ` Busch, Keith
2012-12-13 9:12 ` Kevin Wolf [this message]
2012-12-13 9:34 ` Paolo Bonzini
2012-12-13 9:33 ` Paolo Bonzini
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=50C99C0C.80704@redhat.com \
--to=kwolf@redhat.com \
--cc=afaerber@suse.de \
--cc=hare@suse.de \
--cc=keith.busch@gmail.com \
--cc=keith.busch@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.