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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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):

  Set policy:
   chrt [options] --pid <priority> <pid>

  Get policy:
   chrt [options] -p <pid>


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.


Benno

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux