From a0acd80cdb97e8d8679145674e542c3198238885 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Mon, 13 Nov 2006 18:35:05 +0000 Subject: [PATCH] Cosmetic fixes for vsched. 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 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/vsched.c | 36 +++++++++++++++++++++------- 2 files changed, 93 insertions(+), 9 deletions(-) diff --git a/doc/configuration.xml b/doc/configuration.xml index 040605f..d9f7c55 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -1320,5 +1320,71 @@ tools and can *not* be modified. When this file exists, the cpuset will be assumed to exist already + + + + The initial amount of tokens to put in the bucket + + + The minimum amount of tokens required to unhold the context + + + The bucket's size + + + Amount of tokens to add each interval + + + The interval between refills of the bucket + + + Bias added to priorities calculated within the guest (result is clamped to -20/+19) + + + Amount of tokens to add each interval2 when advancing idle time + + + The interval between refills of the bucket when advancing idle time + + + When this file exists, advancing idle time is activated + + + This directory contains per-CPU and/or per-bucket specific settings. Remember to set the cpu-id file. All CPUs inherit the global settings. + + The initial amount of tokens to put in the bucket + + + The minimum amount of tokens required to unhold the context + + + The bucket's size + + + Amount of tokens to add each interval + + + The interval between refills of the bucket + + + Bias added to priorities calculated within the guest (result is clamped to -20/+19) + + + Amount of tokens to add each interval2 when advancing idle time + + + The interval between refills of the bucket when advancing idle time + + + When this file exists, advancing idle time is activated + + + The CPU to apply these settings to + + + The bucket to apply these settings to + + + diff --git a/src/vsched.c b/src/vsched.c index 358d139..162c388 100644 --- a/src/vsched.c +++ b/src/vsched.c @@ -1,6 +1,7 @@ // $Id$ --*- c -*-- // Copyright (C) 2004 Enrico Scholz +// Copyright (C) 2006 Daniel Hokka Zakrisson // // 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 ] [--fill-rate ] [--interval ] [--tokens ] [--tokens-min ] [--tokens-max ] [--prio-bias ] [--] [ *]\n" + " [--xid ] * [--dir ] [--] [ *]\n" "\n" - "Please report bugs to " PACKAGE_BUGREPORT "\n"); + "Options:\n" + " --fill-rate \n" + " --interval \n" + " --tokens \n" + " --tokens-min \n" + " --tokens-max \n" + " --prio-bias \n" + " --fill-rate2 \n" + " --interval2 \n" + " --cpu-id \n" + " --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 ... read settings from \n" + " --missingok ... do not fail when 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); } -- 1.8.1.5