Linux Manual Pages development
 help / color / mirror / Atom feed
* [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags`
@ 2026-10-23 18:58 Enji Cooper (yaneurabeya)
  2026-10-23 19:37 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Enji Cooper (yaneurabeya) @ 2026-10-23 18:58 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man


[-- Attachment #1.1: Type: text/plain, Size: 986 bytes --]

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 .
 .TP
 .B EINVAL
 .I attr.sched_priority
--  2.50.1 (Apple Git-155)


[-- Attachment #1.2: 0001-man-man2-sched_setattr.2-update-EINVAL-case-with-.sc.patch --]
[-- Type: application/octet-stream, Size: 1406 bytes --]

From b6ec323a19859d9a61773749a049cd142615375c Mon Sep 17 00:00:00 2001
Message-ID: <b6ec323a19859d9a61773749a049cd142615375c.1792781559.git.yaneurabeya@gmail.com>
From: Enji Cooper <yaneurabeya@gmail.com>
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 <alx+linux-man@kernel.org>
Cc: <linux-man@vger.kernel.org>

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 .
 .TP
 .B EINVAL
 .I attr.sched_priority
-- 
2.50.1 (Apple Git-155)


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags`
  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)
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2026-10-23 19:37 UTC (permalink / raw)
  To: Enji Cooper (yaneurabeya); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

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?


Have a lovely night!
Alex

>  .TP
>  .B EINVAL
>  .I attr.sched_priority
> --  2.50.1 (Apple Git-155)
> 





-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags`
  2026-10-23 19:37 ` Alejandro Colomar
@ 2026-10-23 23:56   ` Enji Cooper (yaneurabeya)
  2026-10-24  8:41     ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Enji Cooper (yaneurabeya) @ 2026-10-23 23:56 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

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`.

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.

Cheers!
-Enji

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] man/man2/sched_setattr.2: update `EINVAL` case with `.sched_flags`
  2026-10-23 23:56   ` Enji Cooper (yaneurabeya)
@ 2026-10-24  8:41     ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2026-10-24  8:41 UTC (permalink / raw)
  To: Enji Cooper (yaneurabeya); +Cc: linux-man

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-24  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox