From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: [PATCH 1 of 5] [mq]: sched-credit-options Date: Thu, 17 Nov 2011 11:50:25 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4321059742825423872==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============4321059742825423872== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Patch subject is complete summary. 2 files changed, 26 insertions(+), 7 deletions(-) docs/man/xl.pod.1 | 15 ++++++++++----- tools/libxl/xl_cmdimpl.c | 18 ++++++++++++++++-- --===============4321059742825423872== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen-staging.hg-5.patch # HG changeset patch # User Juergen Gross # Date 1321512799 -3600 # Node ID b83edf5a1c9483b908dacfb5e02033071c7aca3e # Parent fd3567cafe1c7ccd0ddba0ad7fb067d435e13529 [mq]: sched-credit-options diff -r fd3567cafe1c -r b83edf5a1c94 docs/man/xl.pod.1 --- a/docs/man/xl.pod.1 Tue Nov 15 14:50:18 2011 +0100 +++ b/docs/man/xl.pod.1 Thu Nov 17 07:53:19 2011 +0100 @@ -579,25 +579,30 @@ default B is used for scheduling =over 4 -=item B [ B<-d> I [ B<-w>[B<=>I] | B<-c>[B<=>I] ] ] +=item B [I] -Set credit scheduler parameters. The credit scheduler is a +Set or get credit scheduler parameters. The credit scheduler is a proportional fair share CPU scheduler built from the ground up to be work conserving on SMP hosts. Each domain (including Domain0) is assigned a weight and a cap. -B +B =over 4 -=item I +=item B<-d DOMAIN>, B<--domain=DOMAIN> + +Specify domain for which scheduler parameters are to be modified or retrieved. +Mandatory for modifying scheduler parameters. + +=item B<-w WEIGHT>, B<--weight=WEIGHT> A domain with a weight of 512 will get twice as much CPU as a domain with a weight of 256 on a contended host. Legal weights range from 1 to 65535 and the default is 256. -=item I +=item B<-c CAP>, B<--cap=CAP> The cap optionally fixes the maximum amount of CPU a domain will be able to consume, even if the host system has idle CPU cycles. The cap diff -r fd3567cafe1c -r b83edf5a1c94 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Tue Nov 15 14:50:18 2011 +0100 +++ b/tools/libxl/xl_cmdimpl.c Thu Nov 17 07:53:19 2011 +0100 @@ -3716,8 +3716,19 @@ int main_sched_credit(int argc, char **a const char *dom = NULL; int weight = 256, cap = 0, opt_w = 0, opt_c = 0; int opt, rc; - - while ((opt = def_getopt(argc, argv, "d:w:c:", "sched-credit", 0)) != -1) { + int option_index = 0; + static struct option long_options[] = { + {"domain", 1, 0, 'd'}, + {"weight", 1, 0, 'w'}, + {"cap", 1, 0, 'c'}, + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; + + while (1) { + opt = getopt_long(argc, argv, "d:w:c:h", long_options, &option_index); + if (opt == -1) + break; switch (opt) { case 0: case 2: return opt; @@ -3732,6 +3743,9 @@ int main_sched_credit(int argc, char **a cap = strtol(optarg, NULL, 10); opt_c = 1; break; + case 'h': + help("sched-credit"); + return 0; } } --===============4321059742825423872== 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.xensource.com http://lists.xensource.com/xen-devel --===============4321059742825423872==--