[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access d
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access descriptors |
Date: |
Mon, 12 Dec 2016 14:17:28 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Mon, Dec 12, 2016 at 12:18:54PM +0100, Paolo Bonzini wrote:
> @@ -430,41 +431,42 @@ void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned
> int *in_bytes,
> unsigned int *out_bytes,
> unsigned max_in_bytes, unsigned max_out_bytes)
> {
> - unsigned int idx;
> + VirtIODevice *vdev = vq->vdev;
> + unsigned int max, idx;
> unsigned int total_bufs, in_total, out_total;
> - void *desc_ptr = NULL;
> - hwaddr len = 0;
> + MemoryRegionCache *desc_cache = NULL;
> + MemoryRegionCache vring_desc_cache;
> + MemoryRegionCache indirect_desc_cache;
> + int64_t len = 0;
> int rc;
>
> + rcu_read_lock();
Please document the purpose of the rcu_read_lock() in virtio code.
Also, do the goto err cases call rcu_read_unlock()?
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [PATCH 03/11] exec: introduce address_space_extend_translation, (continued)
- [Qemu-devel] [PATCH 05/11] virtio: make virtio_should_notify static, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 04/11] exec: introduce MemoryRegionCache, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 07/11] virtio: use address_space_map/unmap to access descriptors, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 01/11] exec: optimize remaining address_space_* cases, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access descriptors, Paolo Bonzini, 2016/12/12
- Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access descriptors,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 02/11] exec: introduce memory_ldst.inc.c, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 09/11] virtio: add MemoryListener to cache ring translations, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 10/11] virtio: use VRingMemoryRegionCaches for descriptor ring, Paolo Bonzini, 2016/12/12
- [Qemu-devel] [PATCH 11/11] virtio: use VRingMemoryRegionCaches for avail and used rings, Paolo Bonzini, 2016/12/12
- Re: [Qemu-devel] [RFC PATCH 00/11] speedup vring processing with MemoryRegionCaches, Stefan Hajnoczi, 2016/12/12