On Thu, 2012-01-12 at 00:13 +0200, Michael S. Tsirkin wrote:

> > Well, I would argue that the network driver world has proven countless
> > times that those are good ideas :-)
> 
> Below you seem to suggest that separate rings like
> virtio has now is better than a single ring like Rusty
> suggested.

I was merely pointing at examples. My understanding (but I may have
misparsed him) is that Rusty wants to collate the descriptors and the
"available" ring. I personally don't think the completions (the used
ring) should be merged, it should remain separate. If Rusty was hinting
at doing that then I disagree with him :-)

> Are you familiar with current virtio ring structure?  How is this
> different?

Vaguely yes :-) It does have this uni-directional model, I didn't
express myself very well or I got confused by the statements about a
single ring. Yes, I think we should keep the ring at least split into
two directions as it is today.

But we can certainly merge available ring and descriptors ring.

Another option is having the ring entry size be a configurable power of
two. This is trivial and comes at pretty much no cost. That would allow
virtio-net for example to do efficient things like putting the headers
as immediate data in the ring and the data as indirect.

This means a large part of the packet processing can happen without
touching additional cache lines.

Anyway, at this stage, I plan to sit down with Rusty next week and hash
out some kind of proposal, which we can experiment with & benchmark.

I'd suggest doing a simple user space app that creates such a ring,
forks, and produce / consume. We can then run that through perf and
analyze the cache behaviour, maximum throughput, etc....

Cheers,
Ben.


_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to