[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xl sched-credit: support long options
# HG changeset patch # User Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> # Date 1322483011 -3600 # Node ID 864029f7f60083e4f1876f16d97319d972ef6164 # Parent 3915bd95ade5b043d9780fe3f7917a06a5c5a6ae xl sched-credit: support long options The help text of xl sched-credit supported long options. Neither the man page nor the implementation did. Signed-off-by: juergen.gross@xxxxxxxxxxxxxx Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- diff -r 3915bd95ade5 -r 864029f7f600 docs/man/xl.pod.1 --- a/docs/man/xl.pod.1 Thu Dec 01 18:30:29 2011 +0000 +++ b/docs/man/xl.pod.1 Mon Nov 28 13:23:31 2011 +0100 @@ -639,25 +639,30 @@ =over 4 -=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ] +=item B<sched-credit> [I<OPTIONS>] -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<PARAMETERS> +B<OPTIONS> =over 4 -=item I<WEIGHT> +=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<CAP> +=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 3915bd95ade5 -r 864029f7f600 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Dec 01 18:30:29 2011 +0000 +++ b/tools/libxl/xl_cmdimpl.c Mon Nov 28 13:23:31 2011 +0100 @@ -3804,8 +3804,19 @@ 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; @@ -3820,6 +3831,9 @@ cap = strtol(optarg, NULL, 10); opt_c = 1; break; + case 'h': + help("sched-credit"); + return 0; } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |