From: Gabriele Monaco <gmonaco@redhat.com>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-trace-kernel@vger.kernel.org,
John Kacur <jkacur@redhat.com>,
Clark Williams <williams@redhat.com>
Subject: Re: [RFC PATCH 00/11] rv: Add scheduler specification monitors
Date: Fri, 07 Feb 2025 15:57:18 +0100 [thread overview]
Message-ID: <71f969466238803df34d731bf9deafdf5f52c746.camel@redhat.com> (raw)
In-Reply-To: <Z6YYPAiM0itlIVAH@jlelli-thinkpadt14gen4.remote.csb>
On Fri, 2025-02-07 at 15:27 +0100, Juri Lelli wrote:
> On 07/02/25 12:36, Gabriele Monaco wrote:
> >
> >
> > On Fri, 2025-02-07 at 11:55 +0100, Juri Lelli wrote:
> > > Hi Gabriele,
> > >
> > > On 06/02/25 09:09, Gabriele Monaco wrote:
> > > > This patchset starts including adapted scheduler specifications
> > > > from
> > > > Daniel's task model [1].
> > >
> > > Thanks a lot for working on this. Apart from being cool stuff
> > > per-se,
> > > it
> > > means a lot personally to see Daniel's work continuing to be
> > > developed.
> > >
> > > > As the model is fairly complicated, it is split in several
> > > > generators
> > > > and specifications. The tool used to create the model can
> > > > output a
> > > > unified model, but that would be hardly readable (9k states).
> > > >
> > > > RV allows monitors to run and react concurrently. Running the
> > > > cumulative
> > > > model is equivalent to running single components using the same
> > > > reactors, with the advantage that it's easier to point out
> > > > which
> > > > specification failed in case of error.
> > > >
> > > > We allow this by introducing nested monitors, in short, the
> > > > sysfs
> > > > monitor folder will contain a monitor named sched, which is
> > > > nothing
> > > > but
> > > > an empty container for other monitors. Controlling the sched
> > > > monitor
> > > > (enable, disable, set reactors) controls all nested monitors.
> > > >
> > > > The task model proposed by Daniel includes 12 generators and 33
> > > > specifications. The generators are good for documentation but
> > > > are
> > > > usually implied in some specifications.
> > > > Not all monitors work out of the box, mainly because of those
> > > > reasons:
> > > > * need to distinguish if preempt disable leads to schedule
> > > > * need to distinguish if irq disable comes from an actual irq
> > > > * assumptions not always true on SMP
> > > >
> > > > The original task model was designed for PREEMPT_RT and this
> > > > patchset is
> > > > only tested on an upstream kernel with full preemption enabled.
> > >
> > > I played with your additions a bit and I was able to
> > > enable/disable
> > > monitors, switch reactors, etc., w/o noticing any issue.
> > >
> >
> > Thanks for trying it out!
> >
> > > I wonder if you also had ways to test that the monitors actually
> > > react
> > > properly in case of erroneous conditions (so that we can see a
> > > reactor
> > > actually react :).
> > >
> >
> > Well, in my understanding, reactors should fire if there is a
> > problem
> > either in the kernel or in the model logic.
>
> Right. I guess I wonder if we can find a way to inject kernel
> problems
> somehow, so that model(s) can be further tested explicitly thus
> making
> us confident that they will be able to identify real problems when
> they
> occur.
>
Just for the sake of testing reactors there is already the wwnr monitor
which is intentionally broken exactly for that reason, Daniel described
a bit what scenario can trigger the error (some IRQ, so it may be
harder to see in a VM).
If we want any monitor to react, yeah that could be a bit trickier. We
could perhaps do something like livepatching/kprobes.
I'd assume we'd need some care though, since some of those monitors are
pretty basic and making them fail may cause pretty bad errors in the
kernel.
Another approach could be to just inject the tracepoint/handler call
those are all static functions but we may have some luck there and
wouldn't break the system, just trick the monitor.
But good point, I can have a look.
next prev parent reply other threads:[~2025-02-07 14:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 8:09 [RFC PATCH 00/11] rv: Add scheduler specification monitors Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 01/11] tracing: Fix DECLARE_TRACE_CONDITION Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 02/11] rv: Add license identifiers to monitor files Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 03/11] sched: Add sched tracepoints for RV task model Gabriele Monaco
2025-02-06 8:19 ` Peter Zijlstra
2025-02-06 8:36 ` Gabriele Monaco
2025-02-06 8:57 ` Peter Zijlstra
2025-02-06 11:47 ` Gabriele Monaco
2025-02-06 13:36 ` Steven Rostedt
2025-02-06 8:09 ` [RFC PATCH 04/11] rv: Add option for nested monitors and include sched Gabriele Monaco
2025-02-08 16:26 ` kernel test robot
2025-02-06 8:09 ` [RFC PATCH 05/11] rv: Add sco and tss per-cpu monitors Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 06/11] rv: Add snroc per-task monitor Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 07/11] rv: Add scpd, snep and sncid per-cpu monitors Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 08/11] tools/rv: Add support for nested monitors Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 09/11] verification/dot2k: " Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 10/11] Documentation/rv: Add docs for the sched monitors Gabriele Monaco
2025-02-06 8:09 ` [RFC PATCH 11/11] tools/rv: Allow rv list to filter for container Gabriele Monaco
2025-02-07 10:55 ` [RFC PATCH 00/11] rv: Add scheduler specification monitors Juri Lelli
2025-02-07 11:36 ` Gabriele Monaco
2025-02-07 14:27 ` Juri Lelli
2025-02-07 14:57 ` Gabriele Monaco [this message]
2025-02-10 12:56 ` Gabriele Monaco
2025-02-11 9:38 ` Juri Lelli
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=71f969466238803df34d731bf9deafdf5f52c746.camel@redhat.com \
--to=gmonaco@redhat.com \
--cc=jkacur@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=williams@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.