Skip to content
Commit ef626571 authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

kernel/sched: Optimize deadline comparison



Needing to check the current cycle time (which involves a spinlock and
register read on most architectures) is wasteful in the scheduler
priority predicate, which is a hot path.  If we "burn" one bit of
precision (and document the rule), we can do the comparison without
knowing the current time.

2^31 cycles is still far longer than a live deadline thread in any
legitimate realtime app should ever live before being scheduled.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 912914a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment