HomeFreeBSD

Internal scheduling priorities: Always use symbolic ones

Description

Internal scheduling priorities: Always use symbolic ones

Replace priorities specified by a base priority and some hardcoded
offset value by symbolic constants. Hardcoded offsets prevent changing
the difference between priorities without changing their relative
ordering, and is generally a dangerous practice since the resulting
priority may inadvertently belong to a different selection policy's
range.

Since RQ_PPQ is 4, differences of less than 4 are insignificant, so just
remove them. These small differences have not been changed for years,
so it is likely they have no real meaning (besides having no practical
effect). One can still consult the changes history to recover them if
ever needed.

No functional change (intended).

MFC after: 1 month
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45390

Details

Provenance
olceAuthored on May 22 2024, 3:29 PM
Differential Revision
D45390: runq/sched: Switch to 256 distinct levels
Parents
rGbaecdea10eb5: sched_ule: Use a single runqueue per CPU
Branches
Unknown
Tags
Unknown