diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2023-09-27 15:50:33 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-10-04 18:15:06 -0400 |
commit | 850cd20b072cd330cb24aa1c92732b9722998d40 (patch) | |
tree | 1d605e3c657b1eee2cba4bb66e1fbffe23eb88b0 /hw/intc/heathrow_pic.c | |
parent | a6f4d2ec42f3feb6c399f5760a2567ca78897bd7 (diff) | |
download | qemu-850cd20b072cd330cb24aa1c92732b9722998d40.zip qemu-850cd20b072cd330cb24aa1c92732b9722998d40.tar.gz qemu-850cd20b072cd330cb24aa1c92732b9722998d40.tar.bz2 |
virtio: use shadow_avail_idx while checking number of heads
We do not need the most up to date number of heads, we only want to
know if there is at least one.
Use shadow variable as long as it is not equal to the last available
index checked. This avoids expensive qatomic dereference of the
RCU-protected memory region cache as well as the memory access itself.
The change improves performance of the af-xdp network backend by 2-3%.
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Message-Id: <20230927135157.2316982-1-i.maximets@ovn.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/intc/heathrow_pic.c')
0 files changed, 0 insertions, 0 deletions