xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1 of 5] xl sched-credit: support long options
Date: Mon, 28 Nov 2011 13:46:00 +0100	[thread overview]
Message-ID: <3a817a14e6a29657c8f7.1322484360@nehalem1> (raw)
In-Reply-To: <patchbomb.1322484359@nehalem1>

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

The help text of xl sched-credit supported long options. Neither the man page
nor the implementation did.

Signed-off-by: juergen.gross@ts.fujitsu.com


2 files changed, 26 insertions(+), 7 deletions(-)
docs/man/xl.pod.1        |   15 ++++++++++-----
tools/libxl/xl_cmdimpl.c |   18 ++++++++++++++++--



[-- Attachment #2: xen-staging.hg-5.patch --]
[-- Type: text/x-patch, Size: 2817 bytes --]

# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1322483011 -3600
# Node ID 3a817a14e6a29657c8f798987ccb1568a586ea70
# Parent  95d4e2e0bed374602b5a78ee004b057ad8715d65
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@ts.fujitsu.com

diff -r 95d4e2e0bed3 -r 3a817a14e6a2 docs/man/xl.pod.1
--- a/docs/man/xl.pod.1	Fri Nov 25 20:32:05 2011 +0000
+++ b/docs/man/xl.pod.1	Mon Nov 28 13:23:31 2011 +0100
@@ -579,25 +579,30 @@ default B<credit> is used for scheduling
 
 =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 95d4e2e0bed3 -r 3a817a14e6a2 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Nov 25 20:32:05 2011 +0000
+++ b/tools/libxl/xl_cmdimpl.c	Mon Nov 28 13:23:31 2011 +0100
@@ -3720,8 +3720,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;
@@ -3736,6 +3747,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;
         }
     }
 

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

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

  reply	other threads:[~2011-11-28 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 12:45 [PATCH 0 of 5] v2: xl scheduler support Juergen Gross
2011-11-28 12:46 ` Juergen Gross [this message]
2011-11-28 12:46 ` [PATCH 2 of 5] Support cpupools in xl sched-credit Juergen Gross
2011-11-28 12:46 ` [PATCH 3 of 5] Support of xl sched-credit2 Juergen Gross
2011-11-28 12:46 ` [PATCH 4 of 5] Correct error message in libxl_sched_credit_domain_get() Juergen Gross
2011-11-28 12:46 ` [PATCH 5 of 5] Support of xl sched-sedf Juergen Gross
2011-12-01 18:41 ` [PATCH 0 of 5] v2: xl scheduler support Ian Jackson
  -- strict thread matches above, loose matches on Subject: below --
2011-11-17 12:00 [PATCH 0 of 5] " Juergen Gross
2011-11-17 12:00 ` [PATCH 1 of 5] xl sched-credit: support long options Juergen Gross

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=3a817a14e6a29657c8f7.1322484360@nehalem1 \
    --to=juergen.gross@ts.fujitsu.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).