[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when necessary |
Date: |
Tue, 19 Jan 2016 17:20:34 +0100 |
On Fri, 15 Jan 2016 13:41:57 +0100
Paolo Bonzini <address@hidden> wrote:
> From: Vincenzo Maffione <address@hidden>
>
> The virtqueue_pop() implementation needs to check if the avail ring
> contains some pending buffers. To perform this check, it is not
> always necessary to fetch the avail_idx in the VQ memory, which is
> expensive. This patch introduces a shadow variable tracking avail_idx
> and modifies virtio_queue_empty() to access avail_idx in physical
> memory only when necessary.
>
> Signed-off-by: Vincenzo Maffione <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/virtio/virtio.c | 25 +++++++++++++++++++++----
> 1 file changed, 21 insertions(+), 4 deletions(-)
Reviewed-by: Cornelia Huck <address@hidden>
- [Qemu-devel] [PATCH 08/10] virtio: cache used_idx in a VirtQueue field, (continued)
- [Qemu-devel] [PATCH 08/10] virtio: cache used_idx in a VirtQueue field, Paolo Bonzini, 2016/01/15
- [Qemu-devel] [PATCH 02/10] virtio: move allocation to virtqueue_pop/vring_pop, Paolo Bonzini, 2016/01/15
- [Qemu-devel] [PATCH 07/10] virtio: combine the read of a descriptor, Paolo Bonzini, 2016/01/15
- [Qemu-devel] [PATCH 10/10] virtio: combine write of an entry into used ring, Paolo Bonzini, 2016/01/15
- [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when necessary, Paolo Bonzini, 2016/01/15