]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: notify virtqueues without holding spinlock
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 13 Aug 2019 08:25:09 +0000 (10:25 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 28 Aug 2019 07:28:06 +0000 (09:28 +0200)
commit21f68e14f29424e71aeec597ef0251406848bc9d
tree96305451b58691edc9b66e8821ce8b9870963e93
parent21c16c3786aad0c6c619361d3345fdf8269548bf
drm/virtio: notify virtqueues without holding spinlock

Split virtqueue_kick() call into virtqueue_kick_prepare(), which
requires serialization, and virtqueue_notify(), which does not.  Move
the virtqueue_notify() call out of the critical section protected by the
queue lock.  This avoids triggering a vmexit while holding the lock and
thereby fixes a rather bad spinlock contention.

Suggested-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190813082509.29324-3-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_vq.c