[LTP] [PATCH] sched_football: fix false failures on many-CPU systems

Soma Das somadas1@linux.ibm.com
Thu Apr 16 10:26:17 CEST 2026


Hi Li, Jan, John,

Thank you all for the detailed review and discussion.

Based on the feedback, here is what I plan to incorporate in v2:

  *

    Pin only defense threads (one per CPU), leave offense unpinned

  *

    Replace |get_numcpus()| with |tst_ncpus_available()| to handle
    offline CPUs

  *

    Drop the RT throttle disabling entirely - unnecessary once defense
    is pinned per CPU

  *

    Remove the |usleep()| / |tst_check_preempt_rt()| block after kickoff

  *

    Add |join_threads()| before |pthread_barrier_destroy()| for clean
    |-i N| reruns (thanks Jan for catching this)

  *

    Split into separate patches - at minimum fixes #3 and #4 will be
    separate

  *

    Update commit message to clarify the test now verifies per-CPU
    SCHED_FIFO priority ordering

Will send v2 soon.

Thanks,
Soma


On 16/04/26 11:23 AM, Li Wang wrote:
>> That's why I tend to believe disabling throttling for this specific test is the
>> wise and practical approach.
> However, back to the original patch, disabling throttling was
> indeed a bit of an overprotection based on the pined method
> (I didn't realize that before).
>
> Once we go with pin 'defense' threads to every CPU, while leaving
> the offense thread unpinned, this throttling can be kept enabled.
>
> Whichever CPU gets unthrottled first will instantly execute its local
> defensetask, completely starving the lower-priority offense task.
>
> It relies on strict local preemption to perfectly mask the SMP sequential
> unthrottling latency, fixing the test without needing to disable
> sched_rt_runtime_us in the kernel.
>


More information about the ltp mailing list