On Fri, Dec 04, 2020 at 12:31:02PM +0300, Andrey Gruzdev wrote:
> In this particular implementation the same single migration
> thread is responsible for both normal linear dirty page
> migration and procesing UFFD page fault events.
> 
> Processing write faults includes reading UFFD file descriptor,
> finding respective RAM block and saving faulting page to
> the migration stream. After page has been saved, write protection
> can be removed. Since asynchronous version of qemu_put_buffer()
> is expected to be used to save pages, we also have to flush
> migraion stream prior to un-protecting saved memory range.
> 
> Write protection is being removed for any previously protected
> memory chunk that has hit the migration stream. That's valid
> for pages from linear page scan along with write fault pages.
> 
> Signed-off-by: Andrey Gruzdev <andrey.gruz...@virtuozzo.com>

I still think the ram_save_host_page_pre/post are a bit odd; but I think it's
good enough (at least Dave/Juan didn't complain yet, so I guess it's ok).

Reviewed-by: Peter Xu <pet...@redhat.com>

Thanks,

-- 
Peter Xu


Reply via email to