net-sched/vhost-net: Besides Qdisc on host, is it worth to have a tryfor tranfic control on vhost-net device?

From: Liu ping fan
Date: Mon Apr 16 2012 - 02:45:34 EST


Hi guys,

Nowadays, in order to limit the guest's TX bandwidth, we can apply tc
on tap device's ingress Qdisc on host. But I think it is based on
dropping packets in the host's Qdisc layer(Right?).
If my assumption is right, then on guest, whether the sender process
will lower its output or not, will depend on protocol layer implement.
As to protocol armed with congestion control such as tcp, the sender
process will block and save cpu. But as to udp, it seems that the
sender process just generate some unnecessary dropped packets.
In order to save cpu, we can introduce control vhost-net, then the
guest udp sender will block on sk.sk_wmem_alloc to get the same effect
as blocking on congestion like tcp.

But all of above are based on the Qdisc layer's behavior when network
over-limit on host. Is it simply drop skb or defer its transferring?
If deferring, any example code?

Any comments?

Thanks and regards,
pingfan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/