From: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
To: Karel Zak <kzak@redhat.com>, Benno Schulenberg <bensberg@telfort.nl>
Cc: util-linux@vger.kernel.org,
Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Subject: Re: [PATCH v2] chrt: Make priority optional for policies that don't use it
Date: Wed, 18 Jun 2025 15:21:27 +0530 [thread overview]
Message-ID: <bbd6aabd-707d-4fee-b80c-36749cf7c531@linux.ibm.com> (raw)
In-Reply-To: <7nyugk5zfclbpqc2kpcotycgssj6jticujokevyo6ulw7japtl@pnqb6svtmxao>
On 18/06/25 14:48, Karel Zak wrote:
> On Wed, Jun 18, 2025 at 10:18:29AM +0200, Benno Schulenberg wrote:
>>
>> Op 17-06-2025 om 20:24 schreef Madadi Vineeth Reddy:
>>> Currently, chrt requires a priority argument even for scheduling
>>> policies like SCHED_OTHER and SCHED_BATCH, which ignore it.
>>>
>>> This change relaxes that requirement. Now, priority is only expected
>>> for SCHED_FIFO and SCHED_RR. For other policies, a default value of 0
>>> is set internally and no argument is required on the command line.
>>
>> Doesn't this alter the "show-the-current-policy-and-priority" behavior
>> when no priority is given? Currently `./chrt --help` says (trimmed):
>
> Very good point. The priority policy (--{other,...}) should be
> required to ensure that the user wants to alter the setting rather
> than print the current situation. Madadi, what do you think?
>
>> Set policy:
>> chrt [options] --pid <priority> <pid>
>>
>> Get policy:
>> chrt [options] -p <pid>
>
> I really don't like the use of "-p." We should use "--pid" everywhere
> (in --help, man page, and examples).
I can spin off a separate patch to consistently use --pid instead of -p
in the help text, man page, and examples.
Thanks,
Madadi Vineeth Reddy
>
>> Without the proposed change, running `chrt --other --pid $$` says:
>>
>> pid 1427's current scheduling policy: SCHED_OTHER
>> pid 1427's current scheduling priority: 0
>>
>> After the change, that same command outputs nothing. Maybe that is
>> fine, but it would require some adjustment of the docs.
>
> This is bug.
>
> Karel
>
next prev parent reply other threads:[~2025-06-18 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 18:24 [PATCH v2] chrt: Make priority optional for policies that don't use it Madadi Vineeth Reddy
2025-06-18 8:18 ` Benno Schulenberg
2025-06-18 9:18 ` Karel Zak
2025-06-18 9:25 ` Karel Zak
2025-06-18 9:34 ` Madadi Vineeth Reddy
2025-06-18 10:23 ` Madadi Vineeth Reddy
2025-06-18 10:45 ` Karel Zak
2025-06-18 16:33 ` Madadi Vineeth Reddy
2025-06-18 9:51 ` Madadi Vineeth Reddy [this message]
2025-06-18 12:29 ` Benno Schulenberg
2025-06-18 16:41 ` Madadi Vineeth Reddy
2025-06-19 14:15 ` Benno Schulenberg
2025-06-20 5:33 ` Madadi Vineeth Reddy
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=bbd6aabd-707d-4fee-b80c-36749cf7c531@linux.ibm.com \
--to=vineethr@linux.ibm.com \
--cc=bensberg@telfort.nl \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).