qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv3 0/2] virtio: put last seen used index into ring itself
@ 2010-06-01 14:47 Michael S. Tsirkin
  2010-06-01 14:47 ` [Qemu-devel] [PATCHv3 1/2] virtio: support layout with avail ring before idx Michael S. Tsirkin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2010-06-01 14:47 UTC (permalink / raw)
  To: Rusty Russell, linux-kernel, virtualization, kvm, qemu-devel

Changes from v2: added padding between avail idx and flags,
and changed virtio to only publish used index when callbacks
are enabled.

Here's a rewrite of the original patch with a new layout.
I haven't tested it yet so no idea how this performs, but
I think this addresses the cache bounce issue raised by Avi.
Posting for early flames/comments.

Generally, the Host end of the virtio ring doesn't need to see where
Guest is up to in consuming the ring.  However, to completely understand
what's going on from the outside, this information must be exposed.
For example, host can reduce the number of interrupts by detecting
that the guest is currently handling previous buffers.

We add a feature bit so the guest can tell the host that it's writing
out the current value there, if it wants to use that.

This differs from original approach in that the used index
is put after avail index (they are typically written out together).
To avoid cache bounces on descriptor access,
and make future extensions easier, we put the ring itself at start of
page, and move the control after it.


Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


Michael S. Tsirkin (2):
  virtio: support layout with avail ring before idx
  virtio: publish used idx

 drivers/net/virtio_net.c     |    2 +
 drivers/virtio/virtio_ring.c |   25 +++++++++++++++------
 include/linux/virtio_ring.h  |   50 ++++++++++++++++++++++++++++++++++++-----
 3 files changed, 64 insertions(+), 13 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-06-06  9:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 14:47 [Qemu-devel] [PATCHv3 0/2] virtio: put last seen used index into ring itself Michael S. Tsirkin
2010-06-01 14:47 ` [Qemu-devel] [PATCHv3 1/2] virtio: support layout with avail ring before idx Michael S. Tsirkin
2010-06-04  2:34   ` [Qemu-devel] " Rusty Russell
2010-06-04 10:35     ` Michael S. Tsirkin
2010-06-04 11:16       ` Rusty Russell
2010-06-04 11:42         ` Michael S. Tsirkin
2010-06-05  4:10           ` Rusty Russell
2010-06-06  9:11             ` Michael S. Tsirkin
2010-06-01 14:47 ` [Qemu-devel] [PATCHv3 2/2] virtio: publish used idx Michael S. Tsirkin
2010-06-01 15:12 ` [Qemu-devel] Re: [PATCHv3 0/2] virtio: put last seen used index into ring itself Michael S. Tsirkin

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).