All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dieter Bloms <dieter@bloms.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Dieter Bloms <dieter@bloms.de>, Fantu <fantonifabio@tiscali.it>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	George.Dunlap@citrix.com
Subject: Re: Test result of xen-unstable changeset 25249
Date: Fri, 27 Apr 2012 10:21:14 +0200	[thread overview]
Message-ID: <20120427082114.GA28258@bloms.de> (raw)
In-Reply-To: <1335441317.28015.127.camel@zakaz.uk.xensource.com>

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

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.


-- 
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
From field.

[-- Attachment #2: set_correct_default_credit_weight.diff --]
[-- Type: text/x-diff, Size: 1311 bytes --]

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 <dieter@bloms.de>

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:

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2012-04-27  8:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 10:26 Test result of xen-unstable changeset 25249 Fantu
2012-04-26 11:55 ` Ian Campbell
2012-04-26 12:06   ` Fantu
2012-04-26 13:49     ` Ian Campbell
2012-04-26 13:57       ` Fantu
2012-04-26 14:21         ` Ian Campbell
2012-04-27  8:21   ` Dieter Bloms [this message]
2012-04-27  8:44     ` George Dunlap
2012-04-27  9:08       ` Ian Campbell
2012-04-27 12:15         ` Fantu
2012-04-27 13:19           ` Ian Campbell
2012-04-27 14:27             ` Fantu
2012-04-27 14:36               ` Ian Campbell
2012-04-30  8:37                 ` Fantu
2012-04-30  9:10                   ` Fantu
2012-04-27 15:20         ` Dario Faggioli
2012-04-27 15:28           ` Ian Campbell
2012-04-27 15:35             ` Dario Faggioli
2012-04-27 15:38               ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120427082114.GA28258@bloms.de \
    --to=dieter@bloms.de \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=fantonifabio@tiscali.it \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.