[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 5/5] multifd: Implement zero copy write in multifd migrati
From: |
Peter Xu |
Subject: |
Re: [PATCH v7 5/5] multifd: Implement zero copy write in multifd migration (multifd-zero-copy) |
Date: |
Thu, 13 Jan 2022 15:15:28 +0800 |
On Thu, Jan 06, 2022 at 07:13:42PM -0300, Leonardo Bras wrote:
> Implement zero copy on nocomp_send_write(), by making use of QIOChannel
> writev + flags & flush interface.
>
> Change multifd_send_sync_main() so it can distinguish each iteration sync from
> the setup and the completion, so a flush_zero_copy() can be called
> after each iteration in order to make sure all dirty pages are sent
> before a new iteration is started.
Leo - could you remind me (since I remembered we've discussed something
similar) on why we can't simply do the sync() unconditionally for zero copy?
I remember why we need the sync(), but I can't remember what's the matter if we
simply sync() too during setup and complete of migration.
Another trivial nit here:
> -void multifd_send_sync_main(QEMUFile *f)
> +int multifd_send_sync_main(QEMUFile *f, bool sync)
I'd name it "bool full" or anything not called "sync", because the function
already has a name that contains "sync", then it's werid to sync(sync==false).
The rest looks good to me. Thanks.
--
Peter Xu