netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Shirley Ma <mashirle@us.ibm.com>,
	Tom Lendacky <tahm@linux.vnet.ibm.com>,
	Krishna Kumar2 <krkumar2@in.ibm.com>,
	David Miller <davem@davemloft.net>,
	kvm@vger.kernel.org, netdev@vger.kernel.org, steved@us.ibm.com,
	jasowang@redhat.com
Subject: [PATCH 0/2] publish last used index (was Re: TX from KVM guest virtio_net to vhost issues)
Date: Mon, 14 Mar 2011 22:29:58 +0200	[thread overview]
Message-ID: <cover.1300134326.git.mst@redhat.com> (raw)
In-Reply-To: <87d3ly2n81.fsf@rustcorp.com.au>


On Fri, Mar 11, 2011 at 04:49:26PM +1030, Rusty Russell wrote:
> But if one side outruns the other, it does a lot of unnecessary work
> notifying/interrupting it over and over again before the host/guest gets
> a chance to shut notifications/interrupts off.  Hence the last_used
> publishing patch (Xen does this right, I screwed it up).
> 
> Long weekend here, and I'm otherwise committed.  But if noone has
> cleaned up that patch by early next week, I'll try to do so and see if
> we can make a real difference.
> 
> Cheers,
> Rusty.

I actually had the last_used publishing patch working.  Here it is
again: it's the part that publishes the used index from guest and the
part that uses it in host to avoid spurious interrupts
(this is Tom's case, not Shirley's case)
updated to the latest bits, and clarified the code a bit more.

Note: there's some tricky logic in the vhost part, I think I got it right
but please review.

Warning: compiled only, completely untested, I intend to add the bits
that use the last available index in guest to reduce exits, test it all
together.

Would appreciate review and/or testing.

Michael S. Tsirkin (2):
  virtio: put last seen used index into ring itself
  vhost-net: utilize PUBLISH_USED_IDX feature

 drivers/vhost/vhost.c        |   58 +++++++++++++++++++++++++++++++++++++----
 drivers/vhost/vhost.h        |    9 ++++++
 drivers/virtio/virtio_ring.c |   25 +++++++++++------
 include/linux/virtio_ring.h  |   11 ++++++++
 4 files changed, 88 insertions(+), 15 deletions(-)

-- 
1.7.3.2.91.g446ac

  reply	other threads:[~2011-03-14 20:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 21:46 TX from KVM guest virtio_net to vhost issues Shirley Ma
2011-03-11  6:19 ` Rusty Russell
2011-03-14 20:29   ` Michael S. Tsirkin [this message]
2011-03-14 20:30     ` [PATCH 1/2] virtio: put last seen used index into ring itself Michael S. Tsirkin
2011-03-15  0:21       ` Shirley Ma
2011-03-17 12:20         ` Michael S. Tsirkin
2011-03-14 20:30     ` [PATCH 2/2] vhost-net: utilize PUBLISH_USED_IDX feature Michael S. Tsirkin
2011-03-17  0:20   ` TX from KVM guest virtio_net to vhost issues Shirley Ma
2011-03-17  6:00     ` Michael S. Tsirkin
2011-03-17 15:07       ` Shirley Ma

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=cover.1300134326.git.mst@redhat.com \
    --to=mst@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=krkumar2@in.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mashirle@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=steved@us.ibm.com \
    --cc=tahm@linux.vnet.ibm.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).