From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dieter Bloms Subject: Re: Test result of xen-unstable changeset 25249 Date: Fri, 27 Apr 2012 10:21:14 +0200 Message-ID: <20120427082114.GA28258@bloms.de> References: <1335435995180-5667212.post@n5.nabble.com> <1335441317.28015.127.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1UWUbFP1cBYEclgG" Return-path: Content-Disposition: inline In-Reply-To: <1335441317.28015.127.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Dieter Bloms , Fantu , Dario Faggioli , Ian Jackson , George.Dunlap@citrix.com List-Id: xen-devel@lists.xenproject.org --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Apr 26, Ian Campbell wrote: > This is no doubt an issue with 25244:e428eae1838c (CCing author). I > suspect the problem is that you are not setting any scheduler options > but it is unconditionally setting them. I think what it really should be > doing, is reading the current settings, updating those which the user > has specified and writing them back. I'm not sure how best to achieve > that in the libxl api though (CCing some scheduler folks) yes, this is an issue with my patch :( All default values has to be 0, but only for the credit(2) scheduler cpu_weight must not. So I made a patch, which set a default of 256 when the cpu_weight isn't set and credit(2) is used and let it 0 when the scheduler sedf is used. Please try the attached patch and see if it solve this issue. --=20 Best regards Dieter Bloms -- I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the =46rom field. --1UWUbFP1cBYEclgG Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="set_correct_default_credit_weight.diff" libxl: set correct credit cpu weight, when no one is specified in the config file all default values have to be set to 0, but for the credit(2) scheduler cpu_weight has to be 256 by default. So if the weight isn't given in the confgfile we use 256 for the credit(2) scheduler and 0 for sedf Signed-off-by: Dieter Bloms diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index c246211..ec2e3af 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -62,12 +62,18 @@ int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_sched_params *s ret=libxl_sched_sedf_domain_set(ctx, domid, &sedf_info); break; case LIBXL_SCHEDULER_CREDIT: - credit_info.weight = scparams->weight; + if (scparams->weight) + credit_info.weight = scparams->weight; + else + credit_info.weight = 256; credit_info.cap = scparams->cap; ret=libxl_sched_credit_domain_set(ctx, domid, &credit_info); break; case LIBXL_SCHEDULER_CREDIT2: - credit2_info.weight = scparams->weight; + if (scparams->weight) + credit2_info.weight = scparams->weight; + else + credit_info.weight = 256; ret=libxl_sched_credit2_domain_set(ctx, domid, &credit2_info); break; default: --1UWUbFP1cBYEclgG Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --1UWUbFP1cBYEclgG--