Skip to contentSkip to conversation

sched_setattr: bug in `ERRORS` section w.r.t. `attr.sched_flags contains a flag other than SCHED_FLAG_RESET_ON_FORK`

Bug 222094 Alejandro Colomar 1 participant 1 message Oct 23 3 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

A message that is not in the archive (sent off-list or not yet received): [email protected]/

A message that is not in the archive (sent off-list or not yet received): atu07uXukn8V_4YN@debian

Alejandro Colomar

author maintainer
#3 lore raw

[moving discussion to the mailing list]

Hi Enji,

Quoted 65 lines

Date: 2026-10-23 21:27:52+0200
From: Alejandro Colomar <[email protected]>

Hi,

Quoted 5 lines

Date: 2026-10-23 18:47:22+0000
From: [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=222094

Quoted 8 lines

--- Comment #2 from Enji Cooper ([email protected]) --- Created attachment 311258
--> https://bugzilla.kernel.org/attachment.cgi?id=311258&action=edit
Patch

I've honestly never submitted a patch to the Linux mailing lists. There are a lot of hoops to jump through in order to make a contribution... I'll try, but please bear with me (I'll probably get something wrong).

Sure! You're welcome to try. :-)

I've forwarded your patch to the mailing list in this email.

Have a lovely night!
Alex

Signature · 23 lines
<https://www.alejandro-colomar.es>

From cfaef3da82a115fbce47dec58b458c6cfc439667 Mon Sep 17 00:00:00 2001
Message-ID: <cfaef3da82a115fbce47dec58b458c6cfc439667.1792780609.git.yaneurabeya@gmail.com>
From: Enji Cooper <[email protected]>
Date: Fri, 23 Oct 2026 10:39:20 -0700
Subject: [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with
 `.sched_flags`
To: Alejandro Colomar <[email protected]>
Cc: <[email protected]>

In more recent versions of the kernel, `.sched_flags` is a treated as a
bitmask that supports values like `SCHED_FLAG_UTIL_CLAMP_MIN`, etc.

Account for the additional flags so the documentation is up to date with
the kernel implementation of `sched_setattr`.

Ref: linux.git 480a6ca2dc6e ("sched/uclamp: Allow to reset a task uclamp constraint value")

Signed-off-by: Enji Cooper <[email protected]>
---
 man/man2/sched_setattr.2 | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
man/man2/sched_setattr.2 +0 -4
index 80a0ac726dcf..b163ba482390 100644
@@ -411,13 +411,16 @@ .SH ERRORS
 .BR sched (7).
 .TP
 .B EINVAL
-.I attr.sched_policy
-is not one of the recognized policies.
-.TP
-.B EINVAL
 .I attr.sched_flags

man/man2/sched_setattr.2 .SH ERRORS · line 423

Quoted 10 lines
man/man2/sched_setattr.2 +8 -1
 contains a flag other than
-.BR SCHED_FLAG_RESET_ON_FORK .
+.BR SCHED_FLAG_RESET_ON_FORK ,
+.BR SCHED_FLAG_UTIL_CLAMP_MIN ,
+or
+.BR SCHED_FLAG_UTIL_CLAMP_MAX .
+.TP
+.B EINVAL
+.I attr.sched_policy
+is not one of the recognized policies.

I wonder why you moved this paragraph. It doesn't seem to be necessary, right?

Cheers,
Alex

Quoted 6 lines
man/man2/sched_setattr.2 +0 -0
 .TP
 .B EINVAL
 .I attr.sched_priority
Signature · 1 line
2.50.1 (Apple Git-155)
Signature · 1 line
<https://www.alejandro-colomar.es>