[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: |
Peter Xu |
|
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 09:54:49 -0400 |
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>
--
Peter Xu
[PATCH v2 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint, Joao Martins, 2023/05/25