Re: [PATCH v2] chrt: Make priority optional for policies that don't use it

Madadi Vineeth Reddy <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <[email protected]>
On 19/06/25 19:45, Benno Schulenberg wrote:
> 
> Op 18-06-2025 om 18:41 schreef Madadi Vineeth Reddy:
>> So, my thought is just to make priority argument optional for
>> policies that don't use it and keep the existing behavior as is.
> 
> That's not possible.  Currently, doing something like
> 
>   ./chrt --idle --pid $$
> 
> just reports the current policy and priority, and does
> not change the policy (because the priority is missing).
> After your patch, doing the same command reports nothing
> but _does_ change the policy.  You could still make it
> report the current settings, but that would give the
> wrong idea, because it would be the _old_ settings.
> 
> So, as Karel said, silently ignoring the policy option
> when no priority was given was ugly.  Too ugly to keep
> it that way.  As Karel implied: break compatibility and
> do the sensible thing: whenever a policy option is given,
> act upon it -- and when a needed priority is missing,
> error out.
> 

Sure, that makes sense. I will send a patch with these
changes accordingly.

Thanks,
Madadi Vineeth Reddy

> 
> Benno
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.