Thread (1 message) 1 message, 1 author, 2007-08-21

RE: [kvm-devel] [PATCH 00/10] PV-IO v3

From: Rusty Russell <hidden>
Date: 2007-08-21 07:58:42

On Tue, 2007-08-21 at 00:33 -0700, Dor Laor wrote:
quoted
quoted
quoted
Well, for cache reasons you should really try to avoid having both
sides
quoted
quoted
write to the same data.  Hence two separate cache-aligned regions
is
quoted
quoted
quoted
better than one region and a flip bit.
While I certainly can see what you mean about the cache implications
for
quoted
a bit-flip design, I don't see how you can get away with not having
both
quoted
sides write to the same memory in other designs either.  Wouldn't you
still have to adjust descriptors from one ring to the other?  E.g.
wouldn't both sides be writing descriptor pointer data in this case,
or
quoted
am I missing something?
Hi Gregory,

You can have separate produced and consumed counters: see for
example
Van Jacobson's Netchannels presentation
http://www.lemis.com/grog/Documentation/vj/lca06vj.pdf page 23.

This single consumed count isn't sufficient if you can consume
out-of-order: for that you really want a second "reply" ringbuffer
indicating what buffers are consumed.
Rusty, although your code works pretty nice, (I'll send some raw patches
later on today with 
kvm support for virtio). I was wandering why didn't you use Xen's ring
implementation?
They have separate counters and also union for the request/response
structure in the same
descriptor.
Partly the horror of the code, but mainly because it is an in-order
ring.  You'll note that we use a reply ring, so we don't need to know
how much the other side has consumed (and it needn't do so in order).

Cheers,
Rusty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help