On Thu, Jan 06, 2022 at 07:13:40PM -0300, Leonardo Bras wrote:
> Add property that allows zero-copy migration of memory pages,
> and also includes a helper function migrate_use_zero_copy() to check
> if it's enabled.
>
> No code is introduced to actually do the migration, but it allow
> future implementations to enable/disable this feature.
>
> On non-Linux builds this parameter is compiled-out.
I feel sad every time seeing a new parameter needs to be mostly duplicated 3
times in the code. :(
> diff --git a/migration/socket.c b/migration/socket.c
> index 05705a32d8..f7a77aafd3 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -77,6 +77,11 @@ static void socket_outgoing_migration(QIOTask *task,
> } else {
> trace_migration_socket_outgoing_connected(data->hostname);
> }
> +
> + if (migrate_use_zero_copy()) {
> + error_setg(&err, "Zero copy not available in migration");
> + }
I got confused the 1st time looking at it.. I think this is not strongly
needed, but that's okay:
Reviewed-by: Peter Xu <[email protected]>
Thanks,
--
Peter Xu