[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of in
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop |
Date: |
Thu, 28 Jun 2012 18:12:57 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
On 06/28/2012 05:10 PM, Anthony Liguori wrote:
>>
>> 1. read_lock(memmap_lock)
>> 2. MemoryRegionSection mrs = lookup(addr)
>> 3. qom_ref(mrs.mr->dev)
>> 4. read_unlock(memmap_lock)
>>
>> 5. mutex_lock(dev->lock)
>> 6. dispatch(&mrs, addr, data, size)
>> 7. mutex_unlock(dev->lock)
>
> Just a detail, I don't think we should acquire a device specific lock in
> global code. Rather, I think we should acquire the global lock before
> dispatch unless a MemoryRegion is marked as being unlocked.
I think I agree. The mutex acquisition is moved inside dispatch (in
device-specific code). A side effect is that device code must not call
memory_region_destroy() outside its constructor or destructor.
--
error compiling committee.c: too many arguments to function
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, (continued)
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Avi Kivity, 2012/06/27
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Jan Kiszka, 2012/06/27
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Anthony Liguori, 2012/06/28
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop,
Avi Kivity <=
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Marcelo Tosatti, 2012/06/28
- Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Marcelo Tosatti, 2012/06/28
Re: [Qemu-devel] [PATCH] kvm: First step to push iothread lock out of inner run loop, Anthony Liguori, 2012/06/22