On Fri, 2012-05-18 at 17:58 +0800, Jason Wang wrote:On 05/17/2012 11:34 PM, Shirley Ma wrote:Then do you think it's better to replace with vhost_poll_queue hereOn Thu, 2012-05-17 at 10:50 +0800, Jason Wang wrote:capacityThe problem is we may stop the tx queue when there no enoughcouldto
place packets, at this moment we depends on the tx interrupt to
re-enable the tx queue. So if we didn't poll the vhost during
callback,
guest may lose the tx interrupt to re-enable the tx queue which
set_bit(SOCK_ASYNC_NOSPACE,&sock->flags);stall the whole tx queue.VHOST_MAX_PEND should handle the capacity.
Hasn't the above situation been handled in handle_tx() code?:
...
if (unlikely(num_pends> VHOST_MAX_PEND)) {
tx_poll_start(net, sock);
break;It may not help in because:
}
...
Thanks
Shirley
- tx polling depends on skb_orphan() which is often called by device
driver when it place the packet into the queue of the devices instead
of when the packets were sent. So it was too early for vhost to be
notified.
instead?
- it only works when the pending DMAs exceeds VHOST_MAX_PEND, it'sIn which situation the guest needs to be notified when there is no TX
highly possible that guest needs to be notified when the pending
packets
isn't so much.
besides buffers run out?
So this piece of code may not help and could be removed and we needThanks
to
poll the virt-queue during zerocopy callback ( through it could be
further optimized but may not be easy).
Shirley
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html