From: Asias He <asias@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 0/3] virtio: don't poll masked vectors with irqfd
Date: Wed, 19 Dec 2012 16:53:22 +0800 [thread overview]
Message-ID: <50D18082.50509@redhat.com> (raw)
In-Reply-To: <cover.1355833220.git.mst@redhat.com>
On 12/18/2012 08:39 PM, Michael S. Tsirkin wrote:
> At the moment when vector is masked virtio will poll it
> in userspace, even if it is handled by irqfd.
> This is done in order to update pending bits, but
> it's not really required until someone reads the pending bits.
> On the other hand this read results in extra io thread wakeups.
>
> As we only implement the pending bits as a compatibility
> feature (read - real drivers don't use it), we can defer
> the irqfd poll until the read actually happens.
>
> This does not seem to affect vhost-net speed
> in simple benchmarks but could help block: both
> vhost-blk and dataplane when using irqfd,
> and I also think this is cleaner than enabling/disabling
> notifiers all the time.
>
> This will also be the basis for future optimizations.
>
> Michael S. Tsirkin (3):
> msi: add API to get notified about pending bit poll
> msix: expose access to masked/pending state
> virtio-pci: don't poll masked vectors
>
> hw/pci/msix.c | 19 +++++++++++++++----
> hw/pci/msix.h | 6 +++++-
> hw/pci/pci.h | 4 ++++
> hw/vfio_pci.c | 2 +-
> hw/virtio-pci.c | 53 +++++++++++++++++++++++++++++++++++++++++------------
> 5 files changed, 66 insertions(+), 18 deletions(-)
The performance boost is significant here. It is close to the
result of dropping msix_fire_vector_notifier() hack.
--
Asias
next prev parent reply other threads:[~2012-12-19 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 12:39 [Qemu-devel] [PATCH 0/3] virtio: don't poll masked vectors with irqfd Michael S. Tsirkin
2012-12-18 12:39 ` [Qemu-devel] [PATCH 3/3] virtio-pci: don't poll masked vectors Michael S. Tsirkin
2012-12-19 8:59 ` Asias He
2012-12-19 11:29 ` Michael S. Tsirkin
2012-12-19 12:35 ` Stefan Hajnoczi
2012-12-18 12:39 ` [Qemu-devel] [PATCH 2/3] msix: expose access to masked/pending state Michael S. Tsirkin
2012-12-18 12:39 ` [Qemu-devel] [PATCH 1/3] msi: add API to get notified about pending bit poll Michael S. Tsirkin
2012-12-18 12:41 ` [Qemu-devel] [PATCH 0/3] virtio: don't poll masked vectors with irqfd Michael S. Tsirkin
2012-12-19 8:53 ` Asias He [this message]
2012-12-19 11:29 ` Michael S. Tsirkin
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=50D18082.50509@redhat.com \
--to=asias@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).