virtio: limit avail bytes lookahead
Commit
0d8d7690850eb0cf2b2b60933cf47669a6b6f18f introduced
a regression in virtio-net performance because it looks
into the ring aggressively while we really only care
about a single packet worth of buffers.
Reported as bugzilla
1066055 in launchpad.
To fix, add parameters limiting lookahead, and
use in virtqueue_avail_bytes.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reported-by: Edivaldo de Araujo Pereira <[email protected]>
Tested-by: Edivaldo de Araujo Pereira <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>