Thread (47 messages) 47 messages, 6 authors, 2017-09-06

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2017-08-25 22:45:18

quoted
quoted
quoted
quoted
We don't enable network watchdog on virtio but we could and maybe
should.
Can you elaborate?
The issue is that holding onto buffers for very long times makes guests
think they are stuck. This is funamentally because from guest point of
view this is a NIC, so it is supposed to transmit things out in
a timely manner. If host backs the virtual NIC by something that is not
a NIC, with traffic shaping etc introducing unbounded latencies,
guest will be confused.
That assumes that guests are fragile in this regard. A linux guest
does not make such assumptions.
Yes it does. Examples above:
        > > - a single slow flow can occupy the whole ring, you will not
        > >   be able to make any new buffers available for the fast flow
Oh, right. Though those are due to vring_desc pool exhaustion
rather than an upper bound on latency of any single packet.

Limiting the number of zerocopy packets in flight to some fraction
of the ring ensures that fast flows can always grab a slot. Running
out of ubuf_info slots reverts to copy, so indirectly does this. But
I read it correclty the zerocopy pool may be equal to or larger than
the descriptor pool. Should we refine the zcopy_used test

    (nvq->upend_idx + 1) % UIO_MAXIOV != nvq->done_idx

to also return false if the number of outstanding ubuf_info is greater
than, say, vq->num >> 1?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help