Thread (34 messages) 34 messages, 4 authors, 2011-12-08

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

From: Avi Kivity <hidden>
Date: 2011-12-04 11:52:26
Also in: kvm, lkml

Possibly related (same subject, not in this thread)

On 12/03/2011 01:50 PM, Sasha Levin wrote:
On Fri, 2011-12-02 at 11:16 +1030, Rusty Russell wrote:
quoted
On Thu, 1 Dec 2011 12:26:42 +0200, "Michael S. Tsirkin" [off-list ref] wrote:
quoted
On Thu, Dec 01, 2011 at 10:09:37AM +0200, Sasha Levin wrote:
quoted
On Thu, 2011-12-01 at 09:58 +0200, Michael S. Tsirkin wrote:
quoted
We'll presumably need some logic to increment is back,
to account for random workload changes.
Something like slow start?
We can increment it each time the queue was less than 10% full, it
should act like slow start, no?
No, we really shouldn't get an empty ring as long as things behave
well. What I meant is something like:
I was thinking of the network output case, but you're right.  We need to
distinguish between usually full (eg. virtio-net input) and usually
empty (eg. virtio-net output).

The signal for "we to pack more into the ring" is different.  We could
use some hacky heuristic like "out == 0" but I'd rather make it explicit
when we set up the virtqueue.

Our other alternative, moving the logic to the driver, is worse.

As to fading the effect over time, that's harder.  We have to deplete
the ring quite a few times before it turns into always-indirect.  We
could back off every time the ring is totally idle, but that may hurt
bursty traffic.  Let's try simple first?
I tried to take a different approach, and tried putting the indirect
descriptors in a kmem_cache as Michael suggested. The benchmarks showed
that this way virtio-net actually worked faster with indirect on even in
a single stream.
How much better?

I think that if indirects benefit networking, then we're doing something
wrong.  What's going on?  Does the ring get filled too early?  If so we
should expand it.

-- 
error compiling committee.c: too many arguments to function
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help