From c61e14d3a8412cd50d98aab604e607692c844c8a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:30 +0200 Subject: Adding upstream version 2.40. Signed-off-by: Daniel Baumann --- schedutils/chrt.1 | 6 +++--- schedutils/chrt.c | 6 ++++-- schedutils/ionice.1 | 6 +++--- schedutils/ionice.c | 4 ++-- schedutils/taskset.1 | 6 +++--- schedutils/taskset.c | 4 ++-- schedutils/uclampset.1 | 18 ++++++++++++++---- schedutils/uclampset.1.adoc | 8 ++++++-- schedutils/uclampset.c | 16 +++------------- 9 files changed, 40 insertions(+), 34 deletions(-) (limited to 'schedutils') diff --git a/schedutils/chrt.1 b/schedutils/chrt.1 index b99b532..6101429 100644 --- a/schedutils/chrt.1 +++ b/schedutils/chrt.1 @@ -2,12 +2,12 @@ .\" Title: chrt .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2023-11-21 +.\" Date: 2024-01-31 .\" Manual: User Commands -.\" Source: util-linux 2.39.3 +.\" Source: util-linux 2.40 .\" Language: English .\" -.TH "CHRT" "1" "2023-11-21" "util\-linux 2.39.3" "User Commands" +.TH "CHRT" "1" "2024-01-31" "util\-linux 2.40" "User Commands" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 250d878..d343cec 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -90,9 +90,9 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose display status information\n"), out); fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(22)); + fprintf(out, USAGE_HELP_OPTIONS(22)); - printf(USAGE_MAN_TAIL("chrt(1)")); + fprintf(out, USAGE_MAN_TAIL("chrt(1)")); exit(EXIT_SUCCESS); } @@ -485,6 +485,8 @@ int main(int argc, char **argv) if (!ctl->pid) { argv += optind + 1; + if (strcmp(argv[0], "--") == 0) + argv++; execvp(argv[0], argv); errexec(argv[0]); } diff --git a/schedutils/ionice.1 b/schedutils/ionice.1 index 2f68b03..ba48ad5 100644 --- a/schedutils/ionice.1 +++ b/schedutils/ionice.1 @@ -2,12 +2,12 @@ .\" Title: ionice .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2023-10-23 +.\" Date: 2024-01-31 .\" Manual: User Commands -.\" Source: util-linux 2.39.3 +.\" Source: util-linux 2.40 .\" Language: English .\" -.TH "IONICE" "1" "2023-10-23" "util\-linux 2.39.3" "User Commands" +.TH "IONICE" "1" "2024-01-31" "util\-linux 2.40" "User Commands" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/schedutils/ionice.c b/schedutils/ionice.c index 8be83df..e8d3917 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -123,9 +123,9 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -u, --uid ... act on already running processes owned by these users\n"), out); fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(24)); + fprintf(out, USAGE_HELP_OPTIONS(24)); - printf(USAGE_MAN_TAIL("ionice(1)")); + fprintf(out, USAGE_MAN_TAIL("ionice(1)")); exit(EXIT_SUCCESS); } diff --git a/schedutils/taskset.1 b/schedutils/taskset.1 index 851b616..12aa5c7 100644 --- a/schedutils/taskset.1 +++ b/schedutils/taskset.1 @@ -2,12 +2,12 @@ .\" Title: taskset .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2023-11-21 +.\" Date: 2024-01-31 .\" Manual: User Commands -.\" Source: util-linux 2.39.3 +.\" Source: util-linux 2.40 .\" Language: English .\" -.TH "TASKSET" "1" "2023-11-21" "util\-linux 2.39.3" "User Commands" +.TH "TASKSET" "1" "2024-01-31" "util\-linux 2.40" "User Commands" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 diff --git a/schedutils/taskset.c b/schedutils/taskset.c index 0872aa2..98c8da1 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -66,7 +66,7 @@ static void __attribute__((__noreturn__)) usage(void) " -p, --pid operate on existing given pid\n" " -c, --cpu-list display and specify cpus in list format\n" )); - printf(USAGE_HELP_OPTIONS(25)); + fprintf(out, USAGE_HELP_OPTIONS(25)); fputs(USAGE_SEPARATOR, out); fprintf(out, _( @@ -82,7 +82,7 @@ static void __attribute__((__noreturn__)) usage(void) " e.g. 0-31:2 is equivalent to mask 0x55555555\n"), program_invocation_short_name); - printf(USAGE_MAN_TAIL("taskset(1)")); + fprintf(out, USAGE_MAN_TAIL("taskset(1)")); exit(EXIT_SUCCESS); } diff --git a/schedutils/uclampset.1 b/schedutils/uclampset.1 index 7f0f50e..480d5ea 100644 --- a/schedutils/uclampset.1 +++ b/schedutils/uclampset.1 @@ -2,12 +2,12 @@ .\" Title: uclampset .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2023-12-01 +.\" Date: 2024-03-20 .\" Manual: User Commands -.\" Source: util-linux 2.39.3 +.\" Source: util-linux 2.40 .\" Language: English .\" -.TH "UCLAMPSET" "1" "2023-12-01" "util\-linux 2.39.3" "User Commands" +.TH "UCLAMPSET" "1" "2024-03-20" "util\-linux 2.40" "User Commands" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -51,6 +51,16 @@ Setting a task\(cqs \fIuclamp_min\fP to a none zero value will effectively boost By setting a task\(cqs \fIuclamp_max\fP below 1024, this will effectively cap the task as when it runs it\(cqll never be able to go above this utilization value. .sp The full utilization range is: [0:1024]. The special value \-1 is used to reset to system\(cqs default. +.sp +Consult latest kernel documentation for more details: +.sp +.if n .RS 4 +.nf +.fam C +https://kernel.org/doc/html/latest/scheduler/sched\-util\-clamp.html +.fam +.fi +.if n .RE .SH "OPTIONS" .sp \fB\-m\fP @@ -135,7 +145,7 @@ will prevent any task from being boosted higher than 512. And all tasks in the s Consult your kernel docs for the exact expected behavior on that kernel. .SH "AUTHORS" .sp -.MTO "qais.yousef\(atarm.com" "Qais Yousef" "" +.MTO "qyousef\(atlayalina.io" "Qais Yousef" "" .SH "SEE ALSO" .sp \fBnice\fP(1), diff --git a/schedutils/uclampset.1.adoc b/schedutils/uclampset.1.adoc index 62295d3..9558819 100644 --- a/schedutils/uclampset.1.adoc +++ b/schedutils/uclampset.1.adoc @@ -2,7 +2,7 @@ //// uclampset(1) manpage -Copyright (C) 2020-2021 Qais Yousef +Copyright (C) 2020-2021 Qais Yousef Copyright (C) 2020-2021 Arm Ltd This is free documentation; you can redistribute it and/or @@ -60,6 +60,10 @@ By setting a task's _uclamp_max_ below 1024, this will effectively cap the task The full utilization range is: [0:1024]. The special value -1 is used to reset to system's default. +Consult latest kernel documentation for more details: + + https://kernel.org/doc/html/latest/scheduler/sched-util-clamp.html + == OPTIONS *-m*:: @@ -121,7 +125,7 @@ Consult your kernel docs for the exact expected behavior on that kernel. == AUTHORS -mailto:qais.yousef@arm.com[Qais Yousef] +mailto:qyousef@layalina.io[Qais Yousef] == SEE ALSO diff --git a/schedutils/uclampset.c b/schedutils/uclampset.c index 0de806a..5968de9 100644 --- a/schedutils/uclampset.c +++ b/schedutils/uclampset.c @@ -31,7 +31,7 @@ #include "sched_attr.h" #include "strutils.h" -#define NOT_SET -2U +#define NOT_SET 0xdeadbeef struct uclampset { unsigned int util_min; @@ -69,13 +69,13 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -R, --reset-on-fork set reset-on-fork flag\n"), out); fputs(_(" -v, --verbose display status information\n"), out); - printf(USAGE_HELP_OPTIONS(22)); + fprintf(out, USAGE_HELP_OPTIONS(22)); fputs(USAGE_SEPARATOR, out); fputs(_("Utilization value range is [0:1024]. Use special -1 value to " "reset to system's default.\n"), out); - printf(USAGE_MAN_TAIL("uclampset(1)")); + fprintf(out, USAGE_MAN_TAIL("uclampset(1)")); exit(EXIT_SUCCESS); } @@ -211,14 +211,6 @@ static void set_uclamp_system(struct uclampset *ctl) write_uclamp_sysfs(_PATH_PROC_UCLAMP_MAX, ctl->util_max); } -static void validate_util(int val) -{ - if (val > 1024 || val < -1) { - errno = EINVAL; - err(EXIT_FAILURE, _("%d out of range"), val); - } -} - int main(int argc, char **argv) { struct uclampset _ctl = { @@ -268,12 +260,10 @@ int main(int argc, char **argv) case 'm': ctl->util_min = strtos32_or_err(optarg, _("invalid util_min argument")); ctl->util_min_set = 1; - validate_util(ctl->util_min); break; case 'M': ctl->util_max = strtos32_or_err(optarg, _("invalid util_max argument")); ctl->util_max_set = 1; - validate_util(ctl->util_max); break; case 'V': print_version(EXIT_SUCCESS); -- cgit v1.2.3