aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/heathrow_pic.c
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2023-09-27 15:50:33 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-10-04 18:15:06 -0400
commit850cd20b072cd330cb24aa1c92732b9722998d40 (patch)
tree1d605e3c657b1eee2cba4bb66e1fbffe23eb88b0 /hw/intc/heathrow_pic.c
parenta6f4d2ec42f3feb6c399f5760a2567ca78897bd7 (diff)
downloadqemu-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