• Jason Wang's avatar
    vhost_net: stop polling socket during rx processing · 8241a1e4
    Jason Wang authored
    We don't stop rx polling socket during rx processing, this will lead
    unnecessary wakeups from under layer net devices (E.g
    sock_def_readable() form tun). Rx will be slowed down in this
    way. This patch avoids this by stop polling socket during rx
    processing. A small drawback is that this introduces some overheads in
    light load case because of the extra start/stop polling, but single
    netperf TCP_RR does not notice any change. In a super heavy load case,
    e.g using pktgen to inject packet to guest, we get about ~8.8%
    improvement on pps:
    
    before: ~1240000 pkt/s
    after:  ~1350000 pkt/s
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8241a1e4
net.c 29.6 KB