Gabriele Monaco <[email protected]> writes:

> On Wed, 2025-08-06 at 10:01 +0200, Nam Cao wrote:
>> Add "real-time scheduling" monitor, which validates that SCHED_RR and
>> SCHED_FIFO tasks are scheduled before tasks with normal and
>> extensible scheduling policies
>> 
>> Signed-off-by: Nam Cao <[email protected]>
>> ---
>
> The monitor shows a violation also in case of priority inversion
> boosting, e.g.:
>
>  stress-ng --prio-inv 2

This looks like something that would trigger the fair deadline server or
RT throttling. Can you please try disabling both of them:

    echo 0 | tee /sys/kernel/debug/sched/fair_server/cpu*/runtime
    sysctl -w kernel.sched_rt_runtime_us=-1

and see if the problem persists?

> It seems perfectly reasonable from the monitor description but it's
> actually a behaviour meant to improve real time response.
> Is the user seeing this type of violation supposed to make sure all
> locks held by RT tasks are never shared by fair tasks? If that's the
> case I'd mention it in the description.

Boosted fair tasks are treated as RT tasks ;)

> Also very rarely I see failures while cleaning up the monitor, not sure
> exactly what caused it but I could reproduce it with something like:
>
>   for i in $(seq 100); do timeout -s INT 2 rv mon rts -r printk; done
>
> Running the monitor without stopping for the same amount of time
> doesn't seem to show violations (until I terminate it).
>
> "rv" here is the tool under tools/verifications/rv, also the rv package
> on fedora works, but debian/ubuntu may still be shipping an outdated
> version, if they ship one at all.

This one is strange, I cannot reproduce this issue. Did you run only
that command, or did you have other things running as well?

And does the problem still appears after disabling the fair deadline
server and RT throttling?

Thanks for trying it out.

nam


Reply via email to