mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
cpupower: Remove mc and smt power aware scheduler info/settings
These kernel interfaces got removed by:
commit 8e7fbcbc22
Author: Peter Zijlstra <peterz@infradead.org>
Date: Mon Jan 9 11:28:35 2012 +0100
sched: Remove stale power aware scheduling remnants and dysfunctional knobs
No need to further keep them as userspace configurations.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
3fc5a0e51a
commit
7ea1bdb8e1
@ -3,7 +3,7 @@
|
||||
cpupower\-info \- Shows processor power related kernel or hardware configurations
|
||||
.SH SYNOPSIS
|
||||
.ft B
|
||||
.B cpupower info [ \-b ] [ \-s ] [ \-m ]
|
||||
.B cpupower info [ \-b ]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBcpupower info \fP shows kernel configurations or processor hardware
|
||||
|
@ -3,7 +3,7 @@
|
||||
cpupower\-set \- Set processor power related kernel or hardware configurations
|
||||
.SH SYNOPSIS
|
||||
.ft B
|
||||
.B cpupower set [ \-b VAL ] [ \-s VAL ] [ \-m VAL ]
|
||||
.B cpupower set [ \-b VAL ]
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
@ -55,35 +55,6 @@ Use \fBcpupower -c all info -b\fP to verify.
|
||||
|
||||
This options needs the msr kernel driver (CONFIG_X86_MSR) loaded.
|
||||
.RE
|
||||
.PP
|
||||
\-\-sched\-mc, \-m [ VAL ]
|
||||
.RE
|
||||
\-\-sched\-smt, \-s [ VAL ]
|
||||
.RS 4
|
||||
\-\-sched\-mc utilizes cores in one processor package/socket first before
|
||||
processes are scheduled to other processor packages/sockets.
|
||||
|
||||
\-\-sched\-smt utilizes thread siblings of one processor core first before
|
||||
processes are scheduled to other cores.
|
||||
|
||||
The impact on power consumption and performance (positiv or negativ) heavily
|
||||
depends on processor support for deep sleep states, frequency scaling and
|
||||
frequency boost modes and their dependencies between other thread siblings
|
||||
and processor cores.
|
||||
|
||||
Taken over from kernel documentation:
|
||||
|
||||
Adjust the kernel's multi-core scheduler support.
|
||||
|
||||
Possible values are:
|
||||
.RS 2
|
||||
0 - No power saving load balance (default value)
|
||||
|
||||
1 - Fill one thread/core/package first for long running threads
|
||||
|
||||
2 - Also bias task wakeups to semi-idle cpu package for power
|
||||
savings
|
||||
.RE
|
||||
|
||||
.SH "SEE ALSO"
|
||||
cpupower-info(1), cpupower-monitor(1), powertop(1)
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
static struct option set_opts[] = {
|
||||
{ .name = "perf-bias", .has_arg = optional_argument, .flag = NULL, .val = 'b'},
|
||||
{ .name = "sched-mc", .has_arg = optional_argument, .flag = NULL, .val = 'm'},
|
||||
{ .name = "sched-smt", .has_arg = optional_argument, .flag = NULL, .val = 's'},
|
||||
{ },
|
||||
};
|
||||
|
||||
@ -37,8 +35,6 @@ int cmd_info(int argc, char **argv)
|
||||
|
||||
union {
|
||||
struct {
|
||||
int sched_mc:1;
|
||||
int sched_smt:1;
|
||||
int perf_bias:1;
|
||||
};
|
||||
int params;
|
||||
@ -49,23 +45,13 @@ int cmd_info(int argc, char **argv)
|
||||
textdomain(PACKAGE);
|
||||
|
||||
/* parameter parsing */
|
||||
while ((ret = getopt_long(argc, argv, "msb", set_opts, NULL)) != -1) {
|
||||
while ((ret = getopt_long(argc, argv, "b", set_opts, NULL)) != -1) {
|
||||
switch (ret) {
|
||||
case 'b':
|
||||
if (params.perf_bias)
|
||||
print_wrong_arg_exit();
|
||||
params.perf_bias = 1;
|
||||
break;
|
||||
case 'm':
|
||||
if (params.sched_mc)
|
||||
print_wrong_arg_exit();
|
||||
params.sched_mc = 1;
|
||||
break;
|
||||
case 's':
|
||||
if (params.sched_smt)
|
||||
print_wrong_arg_exit();
|
||||
params.sched_smt = 1;
|
||||
break;
|
||||
default:
|
||||
print_wrong_arg_exit();
|
||||
}
|
||||
@ -78,25 +64,6 @@ int cmd_info(int argc, char **argv)
|
||||
if (bitmask_isallclear(cpus_chosen))
|
||||
bitmask_setbit(cpus_chosen, 0);
|
||||
|
||||
if (params.sched_mc) {
|
||||
ret = sysfs_get_sched("mc");
|
||||
printf(_("System's multi core scheduler setting: "));
|
||||
if (ret < 0)
|
||||
/* if sysfs file is missing it's: errno == ENOENT */
|
||||
printf(_("not supported\n"));
|
||||
else
|
||||
printf("%d\n", ret);
|
||||
}
|
||||
if (params.sched_smt) {
|
||||
ret = sysfs_get_sched("smt");
|
||||
printf(_("System's thread sibling scheduler setting: "));
|
||||
if (ret < 0)
|
||||
/* if sysfs file is missing it's: errno == ENOENT */
|
||||
printf(_("not supported\n"));
|
||||
else
|
||||
printf("%d\n", ret);
|
||||
}
|
||||
|
||||
/* Add more per cpu options here */
|
||||
if (!params.perf_bias)
|
||||
return ret;
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
static struct option set_opts[] = {
|
||||
{ .name = "perf-bias", .has_arg = required_argument, .flag = NULL, .val = 'b'},
|
||||
{ .name = "sched-mc", .has_arg = required_argument, .flag = NULL, .val = 'm'},
|
||||
{ .name = "sched-smt", .has_arg = required_argument, .flag = NULL, .val = 's'},
|
||||
{ },
|
||||
};
|
||||
|
||||
@ -38,13 +36,11 @@ int cmd_set(int argc, char **argv)
|
||||
|
||||
union {
|
||||
struct {
|
||||
int sched_mc:1;
|
||||
int sched_smt:1;
|
||||
int perf_bias:1;
|
||||
};
|
||||
int params;
|
||||
} params;
|
||||
int sched_mc = 0, sched_smt = 0, perf_bias = 0;
|
||||
int perf_bias = 0;
|
||||
int ret = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
@ -52,7 +48,7 @@ int cmd_set(int argc, char **argv)
|
||||
|
||||
params.params = 0;
|
||||
/* parameter parsing */
|
||||
while ((ret = getopt_long(argc, argv, "m:s:b:",
|
||||
while ((ret = getopt_long(argc, argv, "b:",
|
||||
set_opts, NULL)) != -1) {
|
||||
switch (ret) {
|
||||
case 'b':
|
||||
@ -66,28 +62,6 @@ int cmd_set(int argc, char **argv)
|
||||
}
|
||||
params.perf_bias = 1;
|
||||
break;
|
||||
case 'm':
|
||||
if (params.sched_mc)
|
||||
print_wrong_arg_exit();
|
||||
sched_mc = atoi(optarg);
|
||||
if (sched_mc < 0 || sched_mc > 2) {
|
||||
printf(_("--sched-mc param out "
|
||||
"of range [0-%d]\n"), 2);
|
||||
print_wrong_arg_exit();
|
||||
}
|
||||
params.sched_mc = 1;
|
||||
break;
|
||||
case 's':
|
||||
if (params.sched_smt)
|
||||
print_wrong_arg_exit();
|
||||
sched_smt = atoi(optarg);
|
||||
if (sched_smt < 0 || sched_smt > 2) {
|
||||
printf(_("--sched-smt param out "
|
||||
"of range [0-%d]\n"), 2);
|
||||
print_wrong_arg_exit();
|
||||
}
|
||||
params.sched_smt = 1;
|
||||
break;
|
||||
default:
|
||||
print_wrong_arg_exit();
|
||||
}
|
||||
@ -96,19 +70,6 @@ int cmd_set(int argc, char **argv)
|
||||
if (!params.params)
|
||||
print_wrong_arg_exit();
|
||||
|
||||
if (params.sched_mc) {
|
||||
ret = sysfs_set_sched("mc", sched_mc);
|
||||
if (ret)
|
||||
fprintf(stderr, _("Error setting sched-mc %s\n"),
|
||||
(ret == -ENODEV) ? "not supported" : "");
|
||||
}
|
||||
if (params.sched_smt) {
|
||||
ret = sysfs_set_sched("smt", sched_smt);
|
||||
if (ret)
|
||||
fprintf(stderr, _("Error setting sched-smt %s\n"),
|
||||
(ret == -ENODEV) ? "not supported" : "");
|
||||
}
|
||||
|
||||
/* Default is: set all CPUs */
|
||||
if (bitmask_isallclear(cpus_chosen))
|
||||
bitmask_setall(cpus_chosen);
|
||||
|
Loading…
Reference in New Issue
Block a user