HomeFreeBSD

runq: Switch to 256 levels

Description

runq: Switch to 256 levels

This increases the number of levels from 64 to 256, which coincides with
the distinct internal priority values (priority is currently encoded in
a 'u_char', whose range is entirely used).

With this change, we become POSIX-compliant for SCHED_FIFO/SCHED_RR in
that we really provide 32 distinct priority levels for these policies.
Previously, threads in the same "priority group", with priority groups
defined as the threads in consecutive spans of 4 priority levels
starting with level 0 up to 31 (so there are 8 groups), could not
preempt or be preempted by each other even if they were assigned
different priority levels.

See also commit "sched_ule: Use a single runqueue per CPU" for all the
drawbacks that this change also removes.

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 14 2024, 12:36 PM
Differential Revision
D45390: runq/sched: Switch to 256 distinct levels
Parents
rGfd141584cf89: zfs: spa: ZIO_TASKQ_ISSUE: Use symbolic priority
Branches
Unknown
Tags
Unknown