qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Revert "memory: syncronize kvm bitmap using bit


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH] Revert "memory: syncronize kvm bitmap using bitmaps operations"
Date: Thu, 30 Jan 2014 23:07:31 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/29/2014 09:03 PM, Paolo Bonzini wrote:
> Il 29/01/2014 09:12, Alexey Kardashevskiy ha scritto:
>> On 01/29/2014 06:30 PM, Paolo Bonzini wrote:
>>> Il 29/01/2014 06:50, Alexey Kardashevskiy ha scritto:
>>>> Since 64K system page size is quite popular configuration on PPC64,
>>>> the original patch breaks migration.
>>>>
>>>> Signed-off-by: Alexey Kardashevskiy <address@hidden>
>>>> ---
>>>>  include/exec/ram_addr.h | 54
>>>> +++++++++++++++++--------------------------------
>>>>  1 file changed, 18 insertions(+), 36 deletions(-)
>>>>
>>>> diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
>>>> index 33c8acc..c6736ed 100644
>>>> --- a/include/exec/ram_addr.h
>>>> +++ b/include/exec/ram_addr.h
>>>> @@ -83,47 +83,29 @@ static inline void
>>>> cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
>>>>                                                            ram_addr_t
>>>> start,
>>>>                                                            ram_addr_t
>>>> pages)
>>>>  {
>>>> -    unsigned long i, j;
>>>> +    unsigned int i, j;
>>>>      unsigned long page_number, c;
>>>>      hwaddr addr;
>>>>      ram_addr_t ram_addr;
>>>> -    unsigned long len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
>>>> +    unsigned int len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS;
>>>>      unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE;
>>>> -    unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS);
>>>>
>>>> -    /* start address is aligned at the start of a word? */
>>>> -    if (((page * BITS_PER_LONG) << TARGET_PAGE_BITS) == start) {
>>>
>>> Why not just add " && hpratio == 1" here?
>>
>> Or fix dirty map to make it 1 bit per system page size (may be the fix is
>> coming, who knows, but I am just not ready to do this now). Or do tricks
>> with bits and support hpratio!=1. I could not choose and decided to revert
>> it for now :)
> 
> Can you post the patch that adds " && hpratio == 1"?

Ok, done.

But I still wonder why there are still TARGET_PAGE_SIZE vs. getpagesize()
and why bitmap formats are different between KVM and QEMU - is it just an
old stuff which has to be fixes some day or something more?


>> Do we really earn a lot here?
> 
> Yes, because this is the only part of migration that runs with the iothread
> lock taken.  Without Juan's patches you can see large guests hiccups that
> last a few seconds.





-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]