[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch v5 6/8] memory: make mmio dispatch able to be ou
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [patch v5 6/8] memory: make mmio dispatch able to be out of biglock |
Date: |
Thu, 01 Nov 2012 17:46:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 |
On 10/30/2012 09:06 AM, liu ping fan wrote:
>>> while (len > 0) {
>>> page = addr & TARGET_PAGE_MASK;
>>> l = (page + TARGET_PAGE_SIZE) - addr;
>>> if (l > len)
>>> l = len;
>>> - section = phys_page_find(d, page >> TARGET_PAGE_BITS);
>>> +
>>> + if (as->lock) {
>>> + qemu_mutex_lock(as->lock);
>>> + safe_ref = memory_region_section_lookup_ref(d, page, &obj_mrs);
>>> + qemu_mutex_unlock(as->lock);
>>> + if (!safe_ref) {
>>> + qemu_mutex_lock_iothread();
>>> + qemu_mutex_lock(as->lock);
>>> + /* when 2nd try, mem map can change, need to judge it
>>> again */
>>> + safe_ref = memory_region_section_lookup_ref(d, page,
>>> &obj_mrs);
>>> + qemu_mutex_unlock(as->lock);
>>> + if (safe_ref) {
>>> + qemu_mutex_unlock_iothread();
>>> + }
>>> + }
>>> + } else {
>>> + /* Caller hold the big lock */
>>> + memory_region_section_lookup_ref(d, page, &obj_mrs);
>>
>> It's not a property of the address space, it's a property of the caller.
>>
> Sorry, what is your meaning?
Whether the caller holds the big lock or not is not known by the address
space. It is only known by the caller itself.
--
error compiling committee.c: too many arguments to function
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [patch v5 6/8] memory: make mmio dispatch able to be out of biglock,
Avi Kivity <=