]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Respect ISR status in virtio header
authorAsias He <asias.hejun@gmail.com>
Sat, 7 May 2011 02:34:19 +0000 (10:34 +0800)
committerPekka Enberg <penberg@kernel.org>
Sat, 7 May 2011 08:38:39 +0000 (11:38 +0300)
commit4ed38b41fc034cfb51fec2004f523fe98faa27f6
tree76ac59554f0dc6701295e403c13d00bad4630079
parente4e20db27716dc191986776a10546720d2a2f051
kvm tools: Respect ISR status in virtio header

Inject IRQ to guest only when ISR status is low which means
guest has read ISR status and device has cleared this bit as
the side effect of this reading.

This reduces a lot of unnecessary IRQ inject from device to
guest.

Netpef test shows this patch changes:

the host to guest bandwidth
from 2866.27 Mbps (cpu 33.96%) to 5548.87 Mbps (cpu 53.87%),

the guest to host bandwitdth
form 1408.86 Mbps (cpu 99.9%) to 1301.29 Mbps (cpu 99.9%).

The bottleneck of the guest to host bandwidth is guest cpu power.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/virtio.h
tools/kvm/virtio/core.c
tools/kvm/virtio/net.c