Page MenuHomeFreeBSD

sched_4bsd: add static assertion for nice weight
Needs ReviewPublic

Authored by mchoo on Fri, Sep 4, 5:36 PM.

Details

Reviewers
jhb
Group Reviewers
scheduler
Summary

When NICE_WEIGHT * (PRIO_MAX - PRIO_MIN) exceeds the timeshare range,
two CPU-bound threads with different nice values can have the same
priority as their nice values are clamped to the timeshare range limit.
Add static assertion on NICE_WEIGHT to ensure that there is always
enough room for nice values in the both end of the timeshare priority
range.

MFC after: 2 weeks
MFC to: stable/14, stable/15
Sponsored by: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76504
Build 73387: arc lint + arc unit