linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: Gabriele Monaco <gmonaco@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Subject: Re: [PATCH v2 5/5] rv: Add rts monitor
Date: Fri, 08 Aug 2025 07:29:51 +0200	[thread overview]
Message-ID: <87ikiypei8.fsf@yellow.woof> (raw)
In-Reply-To: <ecd720a0b971658a915473f0f864668cd6e1ef1a.camel@redhat.com>

Gabriele Monaco <gmonaco@redhat.com> 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 <namcao@linutronix.de>
>> ---
>
> 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	other threads:[~2025-08-08  5:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  8:01 [PATCH v2 0/5] rv: LTL per-cpu monitor type and real-time scheduling monitor Nam Cao
2025-08-06  8:01 ` [PATCH v2 1/5] rv/ltl: Prepare for other monitor types Nam Cao
2025-08-06  8:01 ` [PATCH v2 2/5] rv/ltl: Support per-cpu monitors Nam Cao
2025-08-07 13:28   ` Gabriele Monaco
2025-08-06  8:01 ` [PATCH v2 3/5] verification/rvgen/ltl: Support per-cpu monitor generation Nam Cao
2025-08-07 13:06   ` Gabriele Monaco
2025-08-08  5:12     ` Nam Cao
2025-08-08  6:21       ` Gabriele Monaco
2025-08-08  6:30         ` Nam Cao
2025-08-06  8:01 ` [PATCH v2 4/5] sched: Add task enqueue/dequeue trace points Nam Cao
2025-08-15 13:40   ` Peter Zijlstra
2025-08-15 13:52     ` Peter Zijlstra
2025-08-21  7:05       ` Nam Cao
2025-08-21  8:43         ` K Prateek Nayak
2025-08-19  7:49     ` Nam Cao
2025-08-19  8:24       ` Peter Zijlstra
2025-08-06  8:01 ` [PATCH v2 5/5] rv: Add rts monitor Nam Cao
2025-08-06 20:28   ` kernel test robot
2025-08-07 13:33   ` Gabriele Monaco
2025-08-08  5:13     ` Nam Cao
2025-08-07 14:34   ` Gabriele Monaco
2025-08-08  5:29     ` Nam Cao [this message]
2025-08-08  7:30       ` Gabriele Monaco
2025-08-15 13:48   ` Peter Zijlstra
2025-08-19  7:54     ` Nam Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikiypei8.fsf@yellow.woof \
    --to=namcao@linutronix.de \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=gmonaco@redhat.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@suse.de \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).