From: Isaku Yamahata Subject: Re: [PATCH v3 27/35] postcopy/outgoing: implement forward/backword prefault Date: Fri, 2 Nov 2012 14:24:34 +0900 Message-ID: <20121102052434.GH22180@valinux.co.jp> References: <5092D745.1030606@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: benoit.hudzia@gmail.com, aarcange@redhat.com, aliguori@us.ibm.com, kvm@vger.kernel.org, quintela@redhat.com, stefanha@gmail.com, t.hirofuchi@aist.go.jp, dlaor@redhat.com, satoshi.itoh@aist.go.jp, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp, owasserm@redhat.com, avi@redhat.com, pbonzini@redhat.com, chegu_vinod@hp.com To: Eric Blake Return-path: Content-Disposition: inline In-Reply-To: <5092D745.1030606@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Thu, Nov 01, 2012 at 02:10:45PM -0600, Eric Blake wrote: > On 10/30/2012 02:33 AM, Isaku Yamahata wrote: > > When page is requested, send surrounding pages are also sent. > > > > Signed-off-by: Isaku Yamahata > > --- > > hmp-commands.hx | 15 ++++++++----- > > hmp.c | 3 +++ > > migration-postcopy.c | 57 +++++++++++++++++++++++++++++++++++++++++++++----- > > migration.c | 20 ++++++++++++++++++ > > migration.h | 2 ++ > > qapi-schema.json | 3 ++- > > 6 files changed, 89 insertions(+), 11 deletions(-) > > > > diff --git a/hmp-commands.hx b/hmp-commands.hx > > index b054760..5e2c77c 100644 > > --- a/hmp-commands.hx > > +++ b/hmp-commands.hx > > @@ -826,26 +826,31 @@ ETEXI > > > > { > > .name = "migrate", > > - .args_type = "detach:-d,blk:-b,inc:-i,postcopy:-p,nobg:-n,uri:s", > > - .params = "[-d] [-b] [-i] [-p [-n]] uri", > > + .args_type = "detach:-d,blk:-b,inc:-i,postcopy:-p,nobg:-n,uri:s," > > + "forward:i?,backward:i?", > > + .params = "[-d] [-b] [-i] [-p [-n] uri [forward] [backword]", > > I don't care what we do to the 'migrate' HMP command, but for QMP... > > > +++ b/qapi-schema.json > > @@ -2095,7 +2095,8 @@ > > ## > > { 'command': 'migrate', > > 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' , > > - '*postcopy': 'bool', '*nobg': 'bool'} } > > + '*postcopy': 'bool', '*nobg': 'bool', > > + '*forward': 'int', '*backward': 'int'} } > > Do we really want to be adding new options to migrate (and if so, > where's the documentation), or do we need a new monitor command similar > to migrate-set-capabilities or migrate-set-cache-size? Okay, migrate-set-capabilities seems usable for boolean and scalable for future extension. On the other hand, migrate-set-cache-size takes only single integer as arguments. So it doesn't seem usable without modification. How about this? { 'type': 'MigrationParameters', 'data': {'parameter': 'name': 'str', 'value': 'int' } } { 'command': 'migrate-set-parameters', 'data': { 'parameters' ['MigrationParameters']}} { 'command': 'query-migrate-parameters', 'returns': [['MigrationParameters']]} -- yamahata