Cosmetic fixes for vsched.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 13 Nov 2006 18:35:05 +0000 (18:35 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 13 Nov 2006 18:35:05 +0000 (18:35 +0000)
Document the configuration format.

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2376 94cd875c-1c1d-0410-91d2-eb244daf1a30

doc/configuration.xml
src/vsched.c

index 040605f..d9f7c55 100644 (file)
@@ -1320,5 +1320,71 @@ tools and can *not* be modified.
         <description>When this file exists, the cpuset will be assumed to exist already</description>
       </scalar>
     </collection>
+
+    <collection name="sched" since="0.30.212">
+      <scalar id="global-tokens" name="tokens">
+        <description>The initial amount of tokens to put in the bucket</description>
+      </scalar>
+      <scalar id="global-tokens-min" name="tokens-min">
+        <description>The minimum amount of tokens required to unhold the context</description>
+      </scalar>
+      <scalar id="global-tokens-max" name="tokens-max">
+        <description>The bucket's size</description>
+      </scalar>
+      <scalar id="global-fill-rate" name="fill-rate">
+        <description>Amount of tokens to add each <optionref ref="global-interval">interval</optionref></description>
+      </scalar>
+      <scalar id="global-interval" name="interval">
+        <description>The interval between refills of the bucket</description>
+      </scalar>
+      <scalar id="global-priority-bias" name="priority-bias">
+        <description>Bias added to priorities calculated within the guest (result is clamped to -20/+19)</description>
+      </scalar>
+      <scalar id="global-fill-rate2" name="fill-rate2">
+        <description>Amount of tokens to add each <optionref ref="global-interval2">interval2</optionref> when advancing idle time</description>
+      </scalar>
+      <scalar id="global-interval2" name="interval2">
+        <description>The interval between refills of the bucket when advancing idle time</description>
+      </scalar>
+      <boolean id="global-idle-time" name="idle-time">
+        <description>When this file exists, advancing idle time is activated</description>
+      </boolean>
+      <collection name="cpu-id" type="symbolic">
+        <description>This directory contains per-CPU and/or per-bucket specific settings. Remember to set the <optionref ref="cpu-id">cpu-id</optionref> file. All CPUs inherit the global settings.</description>
+        <scalar name="tokens">
+          <description>The initial amount of tokens to put in the bucket</description>
+        </scalar>
+        <scalar name="tokens-min">
+          <description>The minimum amount of tokens required to unhold the context</description>
+        </scalar>
+        <scalar name="tokens-max">
+          <description>The bucket's size</description>
+        </scalar>
+        <scalar name="fill-rate">
+          <description>Amount of tokens to add each <optionref ref="interval">interval</optionref></description>
+        </scalar>
+        <scalar name="interval">
+          <description>The interval between refills of the bucket</description>
+        </scalar>
+        <scalar name="priority-bias">
+          <description>Bias added to priorities calculated within the guest (result is clamped to -20/+19)</description>
+        </scalar>
+        <scalar name="fill-rate2">
+          <description>Amount of tokens to add each <optionref ref="interval2">interval2</optionref> when advancing idle time</description>
+        </scalar>
+        <scalar name="interval2">
+          <description>The interval between refills of the bucket when advancing idle time</description>
+        </scalar>
+        <boolean name="idle-time">
+          <description>When this file exists, advancing idle time is activated</description>
+        </boolean>
+        <scalar name="cpu-id">
+          <description>The CPU to apply these settings to</description>
+        </scalar>
+        <scalar name="bucket-id">
+          <description>The bucket to apply these settings to</description>
+        </scalar>
+      </collection>
+    </collection>
   </collection>
   </database>
index 358d139..162c388 100644 (file)
@@ -1,6 +1,7 @@
 // $Id$    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+// Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
 //  
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -96,13 +97,13 @@ struct sched_opt {
 };
 #define FOPT(NAME,MASK,FIELD)  { #NAME, MASK, offsetof(struct vc_set_sched, FIELD) }
 static struct sched_opt FILE_OPTIONS[] = {
-  FOPT(fill-rate,      VC_VXSM_FILL_RATE,              fill_rate),
-  FOPT(interval,       VC_VXSM_INTERVAL,               interval),
-  FOPT(tokens,         VC_VXSM_TOKENS,                 tokens),
-  FOPT(tokens-min,     VC_VXSM_TOKENS_MIN,             tokens_min),
-  FOPT(tokens-max,     VC_VXSM_TOKENS_MAX,             tokens_max),
-  FOPT(prio-bias,      VC_VXSM_PRIO_BIAS,              priority_bias),
-  FOPT(priority-bias,  VC_VXSM_PRIO_BIAS,              priority_bias),
+  FOPT(fill-rate,      VC_VXSM_FILL_RATE,                      fill_rate),
+  FOPT(interval,       VC_VXSM_INTERVAL,                       interval),
+  FOPT(tokens,         VC_VXSM_TOKENS,                         tokens),
+  FOPT(tokens-min,     VC_VXSM_TOKENS_MIN,                     tokens_min),
+  FOPT(tokens-max,     VC_VXSM_TOKENS_MAX,                     tokens_max),
+  FOPT(prio-bias,      VC_VXSM_PRIO_BIAS,                      priority_bias),
+  FOPT(priority-bias,  VC_VXSM_PRIO_BIAS,                      priority_bias),
   FOPT(fill-rate2,     VC_VXSM_FILL_RATE2|VC_VXSM_IDLE_TIME,   fill_rate2),
   FOPT(interval2,      VC_VXSM_INTERVAL2|VC_VXSM_IDLE_TIME,    interval2),
   FOPT(cpu-id,         VC_VXSM_CPU_ID,                         cpu_id),
@@ -119,9 +120,25 @@ showHelp(int fd, char const *cmd, int res)
   WRITE_MSG(fd, "Usage:\n  ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
-           " [--xid <xid>] [--fill-rate <rate>] [--interval <interval>] [--tokens <tokens>] [--tokens-min <tokens>] [--tokens-max <tokens>] [--prio-bias <bias>] [--] [<command> <args>*]\n"
+           " [--xid <xid>] <sched options>* [--dir <dir>] [--] [<command> <args>*]\n"
            "\n"
-           "Please report bugs to " PACKAGE_BUGREPORT "\n");
+           "Options:\n"
+           "    --fill-rate <rate>\n"
+           "    --interval <interval>\n"
+           "    --tokens <tokens>\n"
+           "    --tokens-min <tokens>\n"
+           "    --tokens-max <tokens>\n"
+           "    --prio-bias <bias>\n"
+           "    --fill-rate2 <rate>\n"
+           "    --interval2 <interval>\n"
+           "    --cpu-id <CPU id>\n"
+           "    --bucket-id <bucket id>\n"
+           "    --idle-time    ...  set the idle time flag; this is required for\n"
+           "                        all updates to the scheduler to keep it enabled\n"
+           "    --force        ...  force update of all per-CPU schedulers now\n"
+           "    --dir <dir>    ...  read settings from <dir>\n"
+           "    --missingok    ...  do not fail when <dir> does not exist\n"
+           "\nPlease report bugs to " PACKAGE_BUGREPORT "\n");
 
   exit(res);
 }
@@ -133,6 +150,7 @@ showVersion()
            "vsched " VERSION " -- modifies scheduling parameters\n"
            "This program is part of " PACKAGE_STRING "\n\n"
            "Copyright (C) 2003,2004 Enrico Scholz\n"
+           "Copyright (C) 2006 Daniel Hokka Zakrisson\n"
            VERSION_COPYRIGHT_DISCLAIMER);
   exit(0);
 }