virtio_ring: Make interrupt suppression spec compliant
authorLadi Prosek <lprosek@redhat.com>
Wed, 31 Aug 2016 12:00:04 +0000 (14:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 15:36:34 +0000 (16:36 +0100)
commit50e1c4d90aff5b1f66f9e28a724f3878cb307846
tree08955e70741073e0ee0abb0f3be300d895afe542
parentf2d9107bd0a0f86c4b3fb539a2d980ada926c276
virtio_ring: Make interrupt suppression spec compliant

commit 0ea1e4a6d9b62cf29e210d2b4ba9fd43917522e3 upstream.

According to the spec, if the VIRTIO_RING_F_EVENT_IDX feature bit is
negotiated the driver MUST set flags to 0. Not dirtying the available
ring in virtqueue_disable_cb also has a minor positive performance
impact, improving L1 dcache load missed by ~0.5% in vring_bench.

Writes to the used event field (vring_used_event) are still unconditional.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virtio/virtio_ring.c