qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Max Reitz <mreitz@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] virtio: don't enable notifications during polling
Date: Wed, 11 Dec 2019 17:37:39 +0000	[thread overview]
Message-ID: <20191211173739.GA947773@stefanha-x1.localdomain> (raw)
In-Reply-To: <20191211105755-mutt-send-email-mst@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

On Wed, Dec 11, 2019 at 10:58:43AM -0500, Michael S. Tsirkin wrote:
> On Mon, Dec 09, 2019 at 09:09:57PM +0000, Stefan Hajnoczi wrote:
> > Virtqueue notifications are not necessary during polling, so we disable
> > them.  This allows the guest driver to avoid MMIO vmexits.
> > Unfortunately the virtio-blk and virtio-scsi handler functions re-enable
> > notifications, defeating this optimization.
> > 
> > Fix virtio-blk and virtio-scsi emulation so they leave notifications
> > disabled.  The key thing to remember for correctness is that polling
> > always checks one last time after ending its loop, therefore it's safe
> > to lose the race when re-enabling notifications at the end of polling.
> > 
> > There is a measurable performance improvement of 5-10% with the null-co
> > block driver.  Real-life storage configurations will see a smaller
> > improvement because the MMIO vmexit overhead contributes less to
> > latency.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> 
> Thanks! I'll queue it for merge after the release. If possible please ping me
> after the release to help make sure it didn't get dropped.

Great, thanks!

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 21:09 [PATCH] virtio: don't enable notifications during polling Stefan Hajnoczi
2019-12-11 15:58 ` Michael S. Tsirkin
2019-12-11 17:37   ` Stefan Hajnoczi [this message]
2019-12-13 11:20 ` 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=20191211173739.GA947773@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.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).