aio-posix: avoid reacquiring rcu_read_lock() when polling
commitf25c0b547916962d0b1be260b5b643287bea0851
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 18 Feb 2020 18:27:08 +0000 (18 18:27 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Sat, 22 Feb 2020 08:26:47 +0000 (22 08:26 +0000)
tree15de99bb92f45f7ffd006085ccb8f5e6fcd40427
parentc9b7d9ec21dfca716f0bb3b68dee75660d86629c
aio-posix: avoid reacquiring rcu_read_lock() when polling

The first rcu_read_lock/unlock() is expensive.  Nested calls are cheap.

This optimization increases IOPS from 73k to 162k with a Linux guest
that has 2 virtio-blk,num-queues=1 and 99 virtio-blk,num-queues=32
devices.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20200218182708.914552-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/aio-posix.c