qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots


From: Andrey Gruzdev
Subject: Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots
Date: Mon, 30 Nov 2020 11:07:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 28.11.2020 01:04, Peter Xu wrote:
On Thu, Nov 26, 2020 at 06:17:28PM +0300, Andrey Gruzdev wrote:
Changes v3->v4:

* 1. Renamed migrate capability 'track-writes-ram'->'background-snapshot'.
* 2. Use array of incompatible caps to replace bulky 'if' constructs.
* 3. Moved UFFD low-level code to the separate module ('util/userfaultfd.c').
* 4. Always do UFFD wr-unprotect on cleanup; just closing file descriptor
*    won't cleanup PTEs anyhow, it will release registration ranges, wait
*    queues etc. but won't cleanup process MM context on MMU level.
* 5. Allow to enable 'background-snapshot' capability on Linux-only hosts.
* 6. Put UFFD code usage under '#ifdef CONFIG_LINUX' prerequisite.
* 7. Removed 'wt_' from RAMState struct.
* 8. Refactored ram_find_and_save_block() to make more clean - poll UFFD
*    wr-fault events in get_queued_page(), use ram_save_host_page_pre(),
*    ram_save_host_page_post() notifiers around ram_save_host_page()
*    instead of bulky inline write-unprotect code.

One thing I mentioned previously but it seems still got lost is that we don't
need dirty tracking for live snapshot.

A few pointers for reference:

   memory_global_dirty_log_start()
   migration_bitmap_sync_precopy()
   memory_region_clear_dirty_bitmap()
   ...

These should not be needed.  But this can also be done on top.

Thanks,


Yes, all off this is really not needed. At least it seems that enabled dirty page logging in KVM makes not too much overhead and migration_bitmap_sync_precopy() is called only once. Let's do it on top.

--
Andrey Gruzdev, Principal Engineer
Virtuozzo GmbH  +7-903-247-6397
                virtuzzo.com



reply via email to

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