[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 3/5] migration: Add zero-copy parameter for QMP/HMP for Li
|
From: |
Leonardo Bras Soares Passos |
|
Subject: |
Re: [PATCH v7 3/5] migration: Add zero-copy parameter for QMP/HMP for Linux |
|
Date: |
Wed, 19 Jan 2022 14:53:23 -0300 |
Hello Peter,
On Thu, Jan 13, 2022 at 4:00 AM Peter Xu <peterx@redhat.com> wrote:
>
> 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:
The idea is to avoid some future issues on testing migration while bisecting.
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
Thanks Peter!
>
> Thanks,
>
> --
> Peter Xu
>
[PATCH v7 3/5] migration: Add zero-copy parameter for QMP/HMP for Linux, Leonardo Bras, 2022/01/06
[PATCH v7 2/5] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX, Leonardo Bras, 2022/01/06