[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 08/11] virtio: use MemoryRegionCache to access descriptors |
Date: |
Tue, 13 Dec 2016 12:14:14 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 12/12/2016 15:17, Stefan Hajnoczi wrote:
>> 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.
Wrong patch, this should be in patch 10 (and then the answer is simply
that VRingMemoryRegionCaches is protected by RCU).
> Also, do the goto err cases call rcu_read_unlock()?
Yes, it does; the err label ends with a "goto done".
Paolo
- [Qemu-devel] [PATCH 05/11] virtio: make virtio_should_notify static, (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
- [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
- Re: [Qemu-devel] [RFC PATCH 00/11] speedup vring processing with MemoryRegionCaches, Christian Borntraeger, 2016/12/13