Re: [PATCH v2 5/5] rv: Add rts monitor
From: Gabriele Monaco
Date: Fri Aug 08 2025 - 03:34:55 EST
On Fri, 2025-08-08 at 07:29 +0200, Nam Cao wrote:
> Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> > 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?
My bad, that was the fair server's doing, ignore what I said.
>
> > 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).
>
> 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?
Also here, I don't seem to reproduce it with both disabled..
Sorry for that, looks good for me then.
Reviewed-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>
Thanks,
Gabriele