Gianni Tedesco
2010-Jul-06 14:42 UTC
[Xen-devel] [PATCH]: as requested, disable_migrate support for libxl
I''ll feel bad taking a free beer off you for this one Dan :) libxl.h | 1 + libxl_dom.c | 1 + xl_cmdimpl.c | 5 +++++ 3 files changed, 7 insertions(+) Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> diff -r a29ebc288d0e tools/libxl/libxl.h --- a/tools/libxl/libxl.h Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl.h Tue Jul 06 15:38:48 2010 +0100 @@ -97,6 +97,7 @@ uint32_t target_memkb; uint32_t video_memkb; uint32_t shadow_memkb; + bool disable_migrate; const char *kernel; int hvm; union { diff -r a29ebc288d0e tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl_dom.c Tue Jul 06 15:38:48 2010 +0100 @@ -68,6 +68,7 @@ (info->hvm) ? info->max_memkb : (info->max_memkb + info->u.pv.slack_memkb)); xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); + xc_domain_disable_migrate(ctx->xch, info->disable_migrate); if (info->hvm) { unsigned long shadow; diff -r a29ebc288d0e tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Jul 06 15:38:48 2010 +0100 @@ -192,6 +192,7 @@ b_info->max_vcpus = 1; b_info->max_memkb = 32 * 1024; b_info->target_memkb = b_info->max_memkb; + b_info->disable_migrate = 0; if (c_info->hvm) { b_info->shadow_memkb = 0; /* Set later */ b_info->video_memkb = 8 * 1024; @@ -360,6 +361,7 @@ printf("\t(tsc_mode %d)\n", b_info->tsc_mode); printf("\t(max_memkb %d)\n", b_info->max_memkb); printf("\t(target_memkb %d)\n", b_info->target_memkb); + printf("\t(disable_migrate %d)\n", b_info->disable_migrate); printf("\t(image\n"); if (c_info->hvm) { @@ -551,6 +553,9 @@ : libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); + if (!xlu_cfg_get_long (config, "disable_migrate", &l)) + b_info->disable_migrate = l; + if (!xlu_cfg_get_long(config, "tsc_mode", &l)) b_info->tsc_mode = l; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan Magenheimer
2010-Jul-06 14:50 UTC
RE: [Xen-devel] [PATCH]: as requested, disable_migrate support for libxl
(Keir, can you also put this in 4.0-testing, assuming the big libxl backport to 4.0-testing is done?)> I''ll feel bad taking a free beer off you for this one Dan :)Don''t feel bad, says Dan who lives in the US state with the highest volume of beer production in the US. Thanks... there are some subtle but significant performance advantages that are lost if this flag is not settable.> -----Original Message----- > From: Gianni Tedesco [mailto:gianni.tedesco@citrix.com] > Sent: Tuesday, July 06, 2010 8:43 AM > To: Xen-devel > Cc: Dan Magenheimer; Dulloor; Stefano Stabellini > Subject: [Xen-devel] [PATCH]: as requested, disable_migrate support for > libxl > > I''ll feel bad taking a free beer off you for this one Dan :) > > libxl.h | 1 + > libxl_dom.c | 1 + > xl_cmdimpl.c | 5 +++++ > 3 files changed, 7 insertions(+) > > Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> > > diff -r a29ebc288d0e tools/libxl/libxl.h > --- a/tools/libxl/libxl.h Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/libxl.h Tue Jul 06 15:38:48 2010 +0100 > @@ -97,6 +97,7 @@ > uint32_t target_memkb; > uint32_t video_memkb; > uint32_t shadow_memkb; > + bool disable_migrate; > const char *kernel; > int hvm; > union { > diff -r a29ebc288d0e tools/libxl/libxl_dom.c > --- a/tools/libxl/libxl_dom.c Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/libxl_dom.c Tue Jul 06 15:38:48 2010 +0100 > @@ -68,6 +68,7 @@ > (info->hvm) ? info->max_memkb : > (info->max_memkb + info->u.pv.slack_memkb)); > xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); > + xc_domain_disable_migrate(ctx->xch, info->disable_migrate); > > if (info->hvm) { > unsigned long shadow; > diff -r a29ebc288d0e tools/libxl/xl_cmdimpl.c > --- a/tools/libxl/xl_cmdimpl.c Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/xl_cmdimpl.c Tue Jul 06 15:38:48 2010 +0100 > @@ -192,6 +192,7 @@ > b_info->max_vcpus = 1; > b_info->max_memkb = 32 * 1024; > b_info->target_memkb = b_info->max_memkb; > + b_info->disable_migrate = 0; > if (c_info->hvm) { > b_info->shadow_memkb = 0; /* Set later */ > b_info->video_memkb = 8 * 1024; > @@ -360,6 +361,7 @@ > printf("\t(tsc_mode %d)\n", b_info->tsc_mode); > printf("\t(max_memkb %d)\n", b_info->max_memkb); > printf("\t(target_memkb %d)\n", b_info->target_memkb); > + printf("\t(disable_migrate %d)\n", b_info->disable_migrate); > > printf("\t(image\n"); > if (c_info->hvm) { > @@ -551,6 +553,9 @@ > : libxl_get_required_shadow_memory(b_info->max_memkb, > b_info->max_vcpus); > > + if (!xlu_cfg_get_long (config, "disable_migrate", &l)) > + b_info->disable_migrate = l; > + > if (!xlu_cfg_get_long(config, "tsc_mode", &l)) > b_info->tsc_mode = l; > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Jul-06 15:51 UTC
Re: [Xen-devel] [PATCH]: as requested, disable_migrate support for libxl
On 06/07/2010 15:50, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:> (Keir, can you also put this in 4.0-testing, assuming > the big libxl backport to 4.0-testing is done?)All tools patches go through Ian Jackson and Stefano now. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2010-Jul-06 16:32 UTC
[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
xc_domain_disable_migrate takes a domid as a parameter, not a boolean: you should call xc_domain_disable_migrate only when info->disable_migrate is set. Also the name of the config file parameter is not called disable_migrate but nomigrate (0 is the default and means migration enabled, 1 means migration disabled). On Tue, 6 Jul 2010, Gianni Tedesco (3P) wrote:> I''ll feel bad taking a free beer off you for this one Dan :) > > libxl.h | 1 + > libxl_dom.c | 1 + > xl_cmdimpl.c | 5 +++++ > 3 files changed, 7 insertions(+) > > Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> > > diff -r a29ebc288d0e tools/libxl/libxl.h > --- a/tools/libxl/libxl.h Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/libxl.h Tue Jul 06 15:38:48 2010 +0100 > @@ -97,6 +97,7 @@ > uint32_t target_memkb; > uint32_t video_memkb; > uint32_t shadow_memkb; > + bool disable_migrate; > const char *kernel; > int hvm; > union { > diff -r a29ebc288d0e tools/libxl/libxl_dom.c > --- a/tools/libxl/libxl_dom.c Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/libxl_dom.c Tue Jul 06 15:38:48 2010 +0100 > @@ -68,6 +68,7 @@ > (info->hvm) ? info->max_memkb : > (info->max_memkb + info->u.pv.slack_memkb)); > xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); > + xc_domain_disable_migrate(ctx->xch, info->disable_migrate); > > if (info->hvm) { > unsigned long shadow; > diff -r a29ebc288d0e tools/libxl/xl_cmdimpl.c > --- a/tools/libxl/xl_cmdimpl.c Mon Jul 05 16:12:59 2010 +0100 > +++ b/tools/libxl/xl_cmdimpl.c Tue Jul 06 15:38:48 2010 +0100 > @@ -192,6 +192,7 @@ > b_info->max_vcpus = 1; > b_info->max_memkb = 32 * 1024; > b_info->target_memkb = b_info->max_memkb; > + b_info->disable_migrate = 0; > if (c_info->hvm) { > b_info->shadow_memkb = 0; /* Set later */ > b_info->video_memkb = 8 * 1024; > @@ -360,6 +361,7 @@ > printf("\t(tsc_mode %d)\n", b_info->tsc_mode); > printf("\t(max_memkb %d)\n", b_info->max_memkb); > printf("\t(target_memkb %d)\n", b_info->target_memkb); > + printf("\t(disable_migrate %d)\n", b_info->disable_migrate); > > printf("\t(image\n"); > if (c_info->hvm) { > @@ -551,6 +553,9 @@ > : libxl_get_required_shadow_memory(b_info->max_memkb, > b_info->max_vcpus); > > + if (!xlu_cfg_get_long (config, "disable_migrate", &l)) > + b_info->disable_migrate = l; > + > if (!xlu_cfg_get_long(config, "tsc_mode", &l)) > b_info->tsc_mode = l; > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gianni Tedesco
2010-Jul-06 16:44 UTC
[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
On Tue, 2010-07-06 at 17:32 +0100, Stefano Stabellini wrote:> xc_domain_disable_migrate takes a domid as a parameter, not a boolean: > you should call xc_domain_disable_migrate only when > info->disable_migrate is set. > > Also the name of the config file parameter is not called disable_migrate > but nomigrate (0 is the default and means migration enabled, 1 meansWell spotted with the domid thing, total brainfart on my part. Incorporated other suggested changes too. diff -r a29ebc288d0e -r b6361364d310 tools/libxl/libxl.h --- a/tools/libxl/libxl.h Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl.h Tue Jul 06 17:41:14 2010 +0100 @@ -97,6 +97,7 @@ uint32_t target_memkb; uint32_t video_memkb; uint32_t shadow_memkb; + bool disable_migrate; const char *kernel; int hvm; union { diff -r a29ebc288d0e -r b6361364d310 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl_dom.c Tue Jul 06 17:41:14 2010 +0100 @@ -68,6 +68,8 @@ (info->hvm) ? info->max_memkb : (info->max_memkb + info->u.pv.slack_memkb)); xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); + if ( info->disable_migrate ) + xc_domain_disable_migrate(ctx->xch, domid); if (info->hvm) { unsigned long shadow; diff -r a29ebc288d0e -r b6361364d310 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Jul 06 17:41:14 2010 +0100 @@ -192,6 +192,7 @@ b_info->max_vcpus = 1; b_info->max_memkb = 32 * 1024; b_info->target_memkb = b_info->max_memkb; + b_info->disable_migrate = 0; if (c_info->hvm) { b_info->shadow_memkb = 0; /* Set later */ b_info->video_memkb = 8 * 1024; @@ -360,6 +361,7 @@ printf("\t(tsc_mode %d)\n", b_info->tsc_mode); printf("\t(max_memkb %d)\n", b_info->max_memkb); printf("\t(target_memkb %d)\n", b_info->target_memkb); + printf("\t(nomigrate %d)\n", b_info->disable_migrate); printf("\t(image\n"); if (c_info->hvm) { @@ -551,6 +553,9 @@ : libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); + if (!xlu_cfg_get_long (config, "nomigrate", &l)) + b_info->disable_migrate = l; + if (!xlu_cfg_get_long(config, "tsc_mode", &l)) b_info->tsc_mode = l; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2010-Jul-06 16:53 UTC
[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
On Tue, 6 Jul 2010, Gianni Tedesco (3P) wrote:> On Tue, 2010-07-06 at 17:32 +0100, Stefano Stabellini wrote: > > xc_domain_disable_migrate takes a domid as a parameter, not a boolean: > > you should call xc_domain_disable_migrate only when > > info->disable_migrate is set. > > > > Also the name of the config file parameter is not called disable_migrate > > but nomigrate (0 is the default and means migration enabled, 1 means > > Well spotted with the domid thing, total brainfart on my part. > Incorporated other suggested changes too.Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Jul-08 16:45 UTC
[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
Gianni Tedesco writes ("[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl"):> Well spotted with the domid thing, total brainfart on my part. > Incorporated other suggested changes too.Thanks for the rework. Unfortunately you didn''t include a Signed-off-by and I''m not all that happy taking a not-completely-trivial patch without it. Could you confirm that you''re happy with this from a copyright point of view please ? I won''t repeat the Developer''s Certificate of Origin explanation which I''ve posted once already today ... Ideally you''d supply a nice commit message too :-). Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gianni Tedesco
2010-Jul-08 16:52 UTC
Re: [Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
On Thu, 2010-07-08 at 17:45 +0100, Ian Jackson wrote:> Gianni Tedesco writes ("[Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl"): > > Well spotted with the domid thing, total brainfart on my part. > > Incorporated other suggested changes too. > > Thanks for the rework. Unfortunately you didn''t include a > Signed-off-by and I''m not all that happy taking a > not-completely-trivial patch without it. Could you confirm that > you''re happy with this from a copyright point of view please ? > > I won''t repeat the Developer''s Certificate of Origin explanation which > I''ve posted once already today ... > > Ideally you''d supply a nice commit message too :-).Well since the changes were so minor from original I signed off I took it for granted. IANAL but from a copyright perspective it probably is trivial as an independent implementation would be identical. Anyway I''m really earning my beer now: 8<---------------- libxl: implement support for nomigrate option in VM profiles Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> diff -r a29ebc288d0e -r b6361364d310 tools/libxl/libxl.h --- a/tools/libxl/libxl.h Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl.h Tue Jul 06 17:41:14 2010 +0100 @@ -97,6 +97,7 @@ uint32_t target_memkb; uint32_t video_memkb; uint32_t shadow_memkb; + bool disable_migrate; const char *kernel; int hvm; union { diff -r a29ebc288d0e -r b6361364d310 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/libxl_dom.c Tue Jul 06 17:41:14 2010 +0100 @@ -68,6 +68,8 @@ (info->hvm) ? info->max_memkb : (info->max_memkb + info->u.pv.slack_memkb)); xc_domain_set_tsc_info(ctx->xch, domid, info->tsc_mode, 0, 0, 0); + if ( info->disable_migrate ) + xc_domain_disable_migrate(ctx->xch, domid); if (info->hvm) { unsigned long shadow; diff -r a29ebc288d0e -r b6361364d310 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon Jul 05 16:12:59 2010 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Jul 06 17:41:14 2010 +0100 @@ -192,6 +192,7 @@ b_info->max_vcpus = 1; b_info->max_memkb = 32 * 1024; b_info->target_memkb = b_info->max_memkb; + b_info->disable_migrate = 0; if (c_info->hvm) { b_info->shadow_memkb = 0; /* Set later */ b_info->video_memkb = 8 * 1024; @@ -360,6 +361,7 @@ printf("\t(tsc_mode %d)\n", b_info->tsc_mode); printf("\t(max_memkb %d)\n", b_info->max_memkb); printf("\t(target_memkb %d)\n", b_info->target_memkb); + printf("\t(nomigrate %d)\n", b_info->disable_migrate); printf("\t(image\n"); if (c_info->hvm) { @@ -551,6 +553,9 @@ : libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); + if (!xlu_cfg_get_long (config, "nomigrate", &l)) + b_info->disable_migrate = l; + if (!xlu_cfg_get_long(config, "tsc_mode", &l)) b_info->tsc_mode = l; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Jul-08 16:55 UTC
Re: [Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl
Gianni Tedesco (3P) writes ("Re: [Xen-devel] Re: [PATCH]: as requested, disable_migrate support for libxl"):> Well since the changes were so minor from original I signed off I took > it for granted. IANAL but from a copyright perspective it probably is > trivial as an independent implementation would be identical. Anyway I''m > really earning my beer now:Thanks, that''s great. Sorry to be picky about the copyright thing; I guess that''s just my Debian background. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel