evl/sched: perform early lookup into FIFO class to pick threads
This change first asserts that the FIFO class is the topmost
scheduling class by design. From this point, we may check this class
upfront when looking for the next runnable thread to pick, without
going though the indirection of its .sched_pick handler.
This allows the compiler to fold most of the FIFO picking code into
the generic __pick_next_thread() routine, saving an indirect call.
This is nicer to the I-cache in all cases, and spares the cycles which
would otherwise be consumed by some vulnerability mitigation code like
retpolines.
On a highly cache-stressed i.mx6q, the worst case latency figures with
this change in dropped from about 5%.
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
Please register or sign in to comment