xl: get rid of the SEDF scheduler

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Dario Faggioli authored and Ian Campbell committed 2015-07-08 14:37:43 +01:00
1 parent 038c6afe08
commit 1583cdd1fd
5 files changed
+1 -221

No files matched your search

+1 -23
View File
@@ -198,7 +198,7 @@ For more details, see F<docs/misc/xl-numa-placement.markdown>.
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.
Honoured by the credit, credit2 and sedf schedulers.
Honoured by the credit and credit2 schedulers.
=item B<cap=N>
@@ -222,28 +222,6 @@ that your VM gets 25% of the available power (50% of 1GHz) rather than
look at performance and cpufreq options in your operating system and
your BIOS.
=item B<period=NANOSECONDS>
The normal EDF scheduling usage in nanoseconds. This means every period
the domain gets cpu time defined in slice.
Honoured by the sedf scheduler.
=item B<slice=NANOSECONDS>
The normal EDF scheduling usage in nanoseconds. it defines the time
a domain get every period time.
Honoured by the sedf scheduler.
=item B<latency=N>
Scaled period if domain is doing heavy I/O.
Honoured by the sedf scheduler.
=item B<extratime=BOOLEAN>
Flag for allowing domain to run in extra time.
Honoured by the sedf scheduler.
=back
=head3 Memory Allocation
-42
View File
@@ -1031,48 +1031,6 @@ Restrict output to domains in the specified cpupool.
=back
=item B<sched-sedf> [I<OPTIONS>]
Set or get Simple EDF (Earliest Deadline First) scheduler parameters. This
scheduler provides weighted CPU sharing in an intuitive way and uses
realtime-algorithms to ensure time guarantees. For more information see
docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
B<OPTIONS>
=over 4
=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<-p PERIOD>, B<--period=PERIOD>
The normal EDF scheduling usage in milliseconds.
=item B<-s SLICE>, B<--slice=SLICE>
The normal EDF scheduling usage in milliseconds.
=item B<-l LATENCY>, B<--latency=LATENCY>
Scaled period if domain is doing heavy I/O.
=item B<-e EXTRA>, B<--extra=EXTRA>
Flag for allowing domain to run in extra time (0 or 1).
=item B<-w WEIGHT>, B<--weight=WEIGHT>
Another way of setting CPU slice.
=item B<-c CPUPOOL>, B<--cpupool=CPUPOOL>
Restrict output to domains in the specified cpupool.
=back
=item B<sched-rtds> [I<OPTIONS>]
Set or get rtds (Real Time Deferrable Server) scheduler parameters.
-1
View File
@@ -66,7 +66,6 @@ int main_memmax(int argc, char **argv);
int main_memset(int argc, char **argv);
int main_sched_credit(int argc, char **argv);
int main_sched_credit2(int argc, char **argv);
int main_sched_sedf(int argc, char **argv);
int main_sched_rtds(int argc, char **argv);
int main_domid(int argc, char **argv);
int main_domname(int argc, char **argv);
-139
View File
@@ -5761,37 +5761,6 @@ static int sched_credit2_domain_output(
return 0;
}
static int sched_sedf_domain_output(
int domid)
{
char *domname;
libxl_domain_sched_params scinfo;
int rc;
if (domid < 0) {
printf("%-33s %4s %6s %-6s %7s %5s %6s\n", "Name", "ID", "Period",
"Slice", "Latency", "Extra", "Weight");
return 0;
}
libxl_domain_sched_params_init(&scinfo);
rc = sched_domain_get(LIBXL_SCHEDULER_SEDF, domid, &scinfo);
if (rc)
return rc;
domname = libxl_domid_to_name(ctx, domid);
printf("%-33s %4d %6d %6d %7d %5d %6d\n",
domname,
domid,
scinfo.period,
scinfo.slice,
scinfo.latency,
scinfo.extratime,
scinfo.weight);
free(domname);
libxl_domain_sched_params_dispose(&scinfo);
return 0;
}
static int sched_rtds_domain_output(
int domid)
{
@@ -6092,114 +6061,6 @@ int main_sched_credit2(int argc, char **argv)
return 0;
}
int main_sched_sedf(int argc, char **argv)
{
const char *dom = NULL;
const char *cpupool = NULL;
int period = 0, opt_p = 0;
int slice = 0, opt_s = 0;
int latency = 0, opt_l = 0;
int extra = 0, opt_e = 0;
int weight = 0, opt_w = 0;
int opt, rc;
static struct option opts[] = {
{"period", 1, 0, 'p'},
{"slice", 1, 0, 's'},
{"latency", 1, 0, 'l'},
{"extra", 1, 0, 'e'},
{"weight", 1, 0, 'w'},
{"cpupool", 1, 0, 'c'},
COMMON_LONG_OPTS,
{0, 0, 0, 0}
};
SWITCH_FOREACH_OPT(opt, "d:p:s:l:e:w:c:h", opts, "sched-sedf", 0) {
case 'd':
dom = optarg;
break;
case 'p':
period = strtol(optarg, NULL, 10);
opt_p = 1;
break;
case 's':
slice = strtol(optarg, NULL, 10);
opt_s = 1;
break;
case 'l':
latency = strtol(optarg, NULL, 10);
opt_l = 1;
break;
case 'e':
extra = strtol(optarg, NULL, 10);
opt_e = 1;
break;
case 'w':
weight = strtol(optarg, NULL, 10);
opt_w = 1;
break;
case 'c':
cpupool = optarg;
break;
}
if (cpupool && (dom || opt_p || opt_s || opt_l || opt_e || opt_w)) {
fprintf(stderr, "Specifying a cpupool is not allowed with other "
"options.\n");
return 1;
}
if (!dom && (opt_p || opt_s || opt_l || opt_e || opt_w)) {
fprintf(stderr, "Must specify a domain.\n");
return 1;
}
if (opt_w && (opt_p || opt_s)) {
fprintf(stderr, "Specifying a weight AND period or slice is not "
"allowed.\n");
}
if (!dom) { /* list all domain's credit scheduler info */
return -sched_domain_output(LIBXL_SCHEDULER_SEDF,
sched_sedf_domain_output,
sched_default_pool_output,
cpupool);
} else {
uint32_t domid = find_domain(dom);
if (!opt_p && !opt_s && !opt_l && !opt_e && !opt_w) {
/* output sedf scheduler info */
sched_sedf_domain_output(-1);
return -sched_sedf_domain_output(domid);
} else { /* set sedf scheduler paramaters */
libxl_domain_sched_params scinfo;
libxl_domain_sched_params_init(&scinfo);
scinfo.sched = LIBXL_SCHEDULER_SEDF;
if (opt_p) {
scinfo.period = period;
scinfo.weight = 0;
}
if (opt_s) {
scinfo.slice = slice;
scinfo.weight = 0;
}
if (opt_l)
scinfo.latency = latency;
if (opt_e)
scinfo.extratime = extra;
if (opt_w) {
scinfo.weight = weight;
scinfo.period = 0;
scinfo.slice = 0;
}
rc = sched_domain_set(domid, &scinfo);
libxl_domain_sched_params_dispose(&scinfo);
if (rc)
return -rc;
}
}
return 0;
}
/*
* <nothing> : List all domain paramters and sched params
* -d [domid] : List domain params for domain
-16
View File
@@ -265,22 +265,6 @@ struct cmd_spec cmd_table[] = {
"-w WEIGHT, --weight=WEIGHT Weight (int)\n"
"-p CPUPOOL, --cpupool=CPUPOOL Restrict output to CPUPOOL"
},
{ "sched-sedf",
&main_sched_sedf, 0, 1,
"Get/set sedf scheduler parameters",
"[options]",
"-d DOMAIN, --domain=DOMAIN Domain to modify\n"
"-p MS, --period=MS Relative deadline(ms)\n"
"-s MS, --slice=MS Worst-case execution time(ms).\n"
" (slice < period)\n"
"-l MS, --latency=MS Scaled period (ms) when domain\n"
" performs heavy I/O\n"
"-e FLAG, --extra=FLAG Flag (0 or 1) controls if domain\n"
" can run in extra time\n"
"-w FLOAT, --weight=FLOAT CPU Period/slice (do not set with\n"
" --period/--slice)\n"
"-c CPUPOOL, --cpupool=CPUPOOL Restrict output to CPUPOOL"
},
{ "sched-rtds",
&main_sched_rtds, 0, 1,
"Get/set rtds scheduler parameters",
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.