• Philippe Gerum's avatar
    evl/sched: perform early lookup into FIFO class to pick threads · fef90a69
    Philippe Gerum authored
    
    
    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: default avatarPhilippe Gerum <rpm@xenomai.org>
    fef90a69
fifo.c 1.98 KB