qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 16/45] Add migration-capability boolean for p


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v5 16/45] Add migration-capability boolean for postcopy-ram.
Date: Fri, 13 Mar 2015 12:58:38 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

* David Gibson (address@hidden) wrote:
> On Wed, Feb 25, 2015 at 04:51:39PM +0000, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> 
> This absolutely needs a commit message.  I shouldn't have to look at
> the code to find out what the presence of this capability asserts, and
> from where to where it's communicating that information.

OK, how about:

The 'postcopy ram' flag allows postcopy migration of RAM;
note that the migration starts off in precopy mode until
postcopy mode is triggered (see the migrate_start_postcopy
patch later in the series).


> > Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> > Reviewed-by: Eric Blake <address@hidden>
> > ---
> >  include/migration/migration.h | 1 +
> >  migration/migration.c         | 9 +++++++++
> >  qapi-schema.json              | 7 ++++++-
> >  3 files changed, 16 insertions(+), 1 deletion(-)
> > 
> > diff --git a/include/migration/migration.h b/include/migration/migration.h
> > index 751caa0..f94af5b 100644
> > --- a/include/migration/migration.h
> > +++ b/include/migration/migration.h
> > @@ -177,6 +177,7 @@ void migrate_add_blocker(Error *reason);
> >   */
> >  void migrate_del_blocker(Error *reason);
> >  
> > +bool migrate_postcopy_ram(void);
> >  bool migrate_rdma_pin_all(void);
> >  bool migrate_zero_blocks(void);
> >  
> > diff --git a/migration/migration.c b/migration/migration.c
> > index 4592060..434864a 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -663,6 +663,15 @@ bool migrate_rdma_pin_all(void)
> >      return s->enabled_capabilities[MIGRATION_CAPABILITY_RDMA_PIN_ALL];
> >  }
> >  
> > +bool migrate_postcopy_ram(void)
> > +{
> > +    MigrationState *s;
> > +
> > +    s = migrate_get_current();
> > +
> > +    return s->enabled_capabilities[MIGRATION_CAPABILITY_X_POSTCOPY_RAM];
> 
> As an asside, I'm assuming you'll get rid of these "x-" prefixes
> before you post a series intended for final inclusion?

I was going to do that as a final patch that removed the x-.

Dave

> 
> > +}
> > +
> >  bool migrate_auto_converge(void)
> >  {
> >      MigrationState *s;
> > diff --git a/qapi-schema.json b/qapi-schema.json
> > index e16f8eb..a8af1cb 100644
> > --- a/qapi-schema.json
> > +++ b/qapi-schema.json
> > @@ -494,10 +494,15 @@
> >  # @auto-converge: If enabled, QEMU will automatically throttle down the 
> > guest
> >  #          to speed up convergence of RAM migration. (since 1.6)
> >  #
> > +# @x-postcopy-ram: Start executing on the migration target before all of 
> > RAM has
> > +#          been migrated, pulling the remaining pages along as needed. 
> > NOTE: If
> > +#          the migration fails during postcopy the VM will fail.  (since 
> > 2.3)
> > +#
> >  # Since: 1.2
> >  ##
> >  { 'enum': 'MigrationCapability',
> > -  'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
> > +  'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
> > +           'x-postcopy-ram'] }
> >  
> >  ##
> >  # @MigrationCapabilityStatus
> 
> -- 
> David Gibson                  | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au        | minimalist, thank you.  NOT _the_ 
> _other_
>                               | _way_ _around_!
> http://www.ozlabs.org/~dgibson


--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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