From: Alejandro Colomar <alx+linux-man@kernel.org>
To: "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags`
Date: Sat, 24 Oct 2026 10:41:39 +0200 [thread overview]
Message-ID: <atxumcwnuz-pnyGe@debian> (raw)
In-Reply-To: <737C7FD6-E204-4C90-B811-26BEECE7D7FC@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2291 bytes --]
Hi Enji,
> Date: 2026-10-23 16:56:51-0700
> From: "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
>
> Hi Alex!
>
> > On Oct 23, 2026, at 12:37 PM, Alejandro Colomar <alx+linux-man@kernel.org> wrote:
> >
> > Hi Enji,
> >
> >> Date: 2026-10-23 11:58:57-0700
> >> From: "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
> >>
> >> 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 <yaneurabeya@gmail.com>
> >> ---
> >> man/man2/sched_setattr.2 | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/man/man2/sched_setattr.2 b/man/man2/sched_setattr.2
> >> index 80a0ac726dcf..64acdd88884f 100644
> >> --- a/man/man2/sched_setattr.2
> >> +++ b/man/man2/sched_setattr.2
> >> @@ -417,7 +417,10 @@ .SH ERRORS
> >> .B EINVAL
> >> .I attr.sched_flags
> >> 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 .
> >
> > Why does this list not include flags such as SCHED_FLAG_RESET_ON_FORK?
> > It is documented in the same manual page, so I expect it's valid here,
> > right?
>
> I actually added the `SCHED_FLAG_UTIL_CLAMP_MIN` and
> `SCHED_FLAG_UTIL_CLAMP_MAX` flags to the list of valid flags, in
> addition to `SCHED_FLAG_RESET_ON_FORK`.
D'oh! I was really confused yesterday! :D
I meant to write SCHED_FLAG_RECLAIM, but then I pasted the wrong one.
> I’m kind of on the the fence with how I worded it though — it’s kind
> of wordy and not really futureproof. I’ll take a look at some of the
> other manpages to see if there’s a better way to word it.
Yes, this is what I meant in the end. We could reword it to say:
Invalid flags specified in
.IR attr.sched_flags .
Have a lovely day!
Alex
>
> Cheers!
> -Enji
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-10-24 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 18:58 [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags` Enji Cooper (yaneurabeya)
2026-10-23 19:37 ` Alejandro Colomar
2026-10-23 23:56 ` Enji Cooper (yaneurabeya)
2026-10-24 8:41 ` Alejandro Colomar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atxumcwnuz-pnyGe@debian \
--to=alx+linux-man@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=yaneurabeya@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox