[PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations

David Hildenbrand posted 5 patches 1 year, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230105124528.93813-1-david@redhat.com
Maintainers: Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
migration/ram.c | 54 ++++++++++++++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 14 deletions(-)
[PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations
Posted by David Hildenbrand 1 year, 3 months ago
Playing with background snapshots in combination with hugetlb and
virtio-mem, I found two issues and some reasonable optimizations (skip
unprotecting when unregistering).

With virtio-mem (RamDiscardManager), we now won't be allocating unnecessary
page tables for unplugged ranges when using uffd-wp with shmem/hugetlb.

Cc: Juan Quintela <quintela@redhat.com> (maintainer:Migration)
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> (maintainer:Migration)
Cc: Peter Xu <peterx@redhat.com>
Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>

David Hildenbrand (5):
  migration/ram: Fix populate_read_range()
  migration/ram: Fix error handling in ram_write_tracking_start()
  migration/ram: Don't explicitly unprotect when unregistering uffd-wp
  migration/ram: Rely on used_length for uffd_change_protection()
  migration/ram: Optimize ram_write_tracking_start() for
    RamDiscardManager

 migration/ram.c | 54 ++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 14 deletions(-)

-- 
2.39.0
Re: [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations
Posted by Peter Xu 1 year, 3 months ago
On Thu, Jan 05, 2023 at 01:45:23PM +0100, David Hildenbrand wrote:
> Playing with background snapshots in combination with hugetlb and
> virtio-mem, I found two issues and some reasonable optimizations (skip
> unprotecting when unregistering).
> 
> With virtio-mem (RamDiscardManager), we now won't be allocating unnecessary
> page tables for unplugged ranges when using uffd-wp with shmem/hugetlb.
> 
> Cc: Juan Quintela <quintela@redhat.com> (maintainer:Migration)
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> (maintainer:Migration)
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
> 
> David Hildenbrand (5):
>   migration/ram: Fix populate_read_range()
>   migration/ram: Fix error handling in ram_write_tracking_start()
>   migration/ram: Don't explicitly unprotect when unregistering uffd-wp
>   migration/ram: Rely on used_length for uffd_change_protection()
>   migration/ram: Optimize ram_write_tracking_start() for
>     RamDiscardManager

For the series:

Acked-by: Peter Xu <peterx@redhat.com>

Thanks,

-- 
Peter Xu
Re: [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations
Posted by David Hildenbrand 1 year, 3 months ago
On 05.01.23 22:11, Peter Xu wrote:
> On Thu, Jan 05, 2023 at 01:45:23PM +0100, David Hildenbrand wrote:
>> Playing with background snapshots in combination with hugetlb and
>> virtio-mem, I found two issues and some reasonable optimizations (skip
>> unprotecting when unregistering).
>>
>> With virtio-mem (RamDiscardManager), we now won't be allocating unnecessary
>> page tables for unplugged ranges when using uffd-wp with shmem/hugetlb.
>>
>> Cc: Juan Quintela <quintela@redhat.com> (maintainer:Migration)
>> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> (maintainer:Migration)
>> Cc: Peter Xu <peterx@redhat.com>
>> Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
>>
>> David Hildenbrand (5):
>>    migration/ram: Fix populate_read_range()
>>    migration/ram: Fix error handling in ram_write_tracking_start()
>>    migration/ram: Don't explicitly unprotect when unregistering uffd-wp
>>    migration/ram: Rely on used_length for uffd_change_protection()
>>    migration/ram: Optimize ram_write_tracking_start() for
>>      RamDiscardManager
> 
> For the series:
> 
> Acked-by: Peter Xu <peterx@redhat.com>

Thanks!

-- 
Thanks,

David / dhildenb
Re: [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations
Posted by David Hildenbrand 1 year, 3 months ago
On 05.01.23 13:45, David Hildenbrand wrote:
> Playing with background snapshots in combination with hugetlb and
> virtio-mem, I found two issues and some reasonable optimizations (skip
> unprotecting when unregistering).
> 
> With virtio-mem (RamDiscardManager), we now won't be allocating unnecessary
> page tables for unplugged ranges when using uffd-wp with shmem/hugetlb.
> 
> Cc: Juan Quintela <quintela@redhat.com> (maintainer:Migration)
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> (maintainer:Migration)
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>

@Juan, David: I can take this via my tree (especially the last patch 
only optimized virtio-mem for now). Just let me know.

-- 
Thanks,

David / dhildenb
Re: [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations
Posted by Juan Quintela 1 year, 2 months ago
David Hildenbrand <david@redhat.com> wrote:
> On 05.01.23 13:45, David Hildenbrand wrote:
>> Playing with background snapshots in combination with hugetlb and
>> virtio-mem, I found two issues and some reasonable optimizations (skip
>> unprotecting when unregistering).
>> With virtio-mem (RamDiscardManager), we now won't be allocating
>> unnecessary
>> page tables for unplugged ranges when using uffd-wp with shmem/hugetlb.
>> Cc: Juan Quintela <quintela@redhat.com> (maintainer:Migration)
>> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> (maintainer:Migration)
>> Cc: Peter Xu <peterx@redhat.com>
>> Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
>
> @Juan, David: I can take this via my tree (especially the last patch
> only optimized virtio-mem for now). Just let me know.

I reviewed everything now.

Queued on my tree.

Later, Juan.