qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physic


From: Joao Martins
Subject: Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()
Date: Thu, 25 May 2023 16:02:01 +0100

On 25/05/2023 14:54, Peter Xu wrote:
> On Thu, May 25, 2023 at 02:47:26PM +0100, Joao Martins wrote:
>> Yeap, Something like this?
>>
>> diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
>> index 8b8f271d0731..deaf746421da 100644
>> --- a/include/exec/ram_addr.h
>> +++ b/include/exec/ram_addr.h
>> @@ -333,6 +333,13 @@ static inline void
>> cpu_physical_memory_set_dirty_range(ram_addr_t start,
>>  }
>>
>>  #if !defined(_WIN32)
>> +
>> +/*
>> + * Contrary to cpu_physical_memory_sync_dirty_bitmap() this function returns
>> + * the number of dirty pages in @bitmap passed as argument. On the other 
>> hand,
>> + * cpu_physical_memory_sync_dirty_bitmap() returns newly dirtied pages that
>> + * weren't set in the global migration bitmap.
>> + */
>>  static inline
>>  uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
>>                                                  ram_addr_t start,
>>
> 
> Good enough to me. :)  With that, feel free to add:
> 
> Reviewed-by: Peter Xu <peterx@redhat.com>
> 
Thank you!



reply via email to

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