[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ede208965844bdb69c76702ace5dfab5f8f731d.camel@redhat.com>
Date: Tue, 19 Aug 2025 16:21:39 +0200
From: Gabriele Monaco <gmonaco@...hat.com>
To: Juri Lelli <juri.lelli@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Ingo Molnar <mingo@...hat.com>,
linux-trace-kernel@...r.kernel.org, Nam Cao <namcao@...utronix.de>, Tomas
Glozar <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>, Clark
Williams <williams@...hat.com>, John Kacur <jkacur@...hat.com>
Subject: Re: [RFC PATCH 14/17] sched: Add deadline tracepoints
On Tue, 2025-08-19 at 16:02 +0200, Juri Lelli wrote:
> On 19/08/25 12:34, Gabriele Monaco wrote:
> >
> >
> > On Tue, 2025-08-19 at 12:12 +0200, Peter Zijlstra wrote:
> > > On Tue, Aug 19, 2025 at 11:56:57AM +0200, Juri Lelli wrote:
> > > > Hi!
> > > >
> > > > On 14/08/25 17:08, Gabriele Monaco wrote:
>
> ...
>
> > > > > @@ -1482,6 +1486,7 @@ static void update_curr_dl_se(struct rq
> > > > > *rq, struct sched_dl_entity *dl_se, s64
> > > > >
> > > > > throttle:
> > > > > if (dl_runtime_exceeded(dl_se) || dl_se->dl_yielded)
> > > > > {
> > > > > + trace_sched_dl_throttle_tp(dl_se);
> > > > > dl_se->dl_throttled = 1;
> > > >
> > > > I believe we also need to trace the dl_check_constrained_dl()
> > > > throttle, please take a look.
> >
> > Probably yes, strangely I couldn't see failures without it, but it
> > may
> > be down to my test setup. I'm going to have a look.
>
> Not sure if you tested with constrained (deadline != period) tasks.
Not much actually.. I should start.
> > > > Also - we discussed this point a little already offline - but I
> > > > still wonder if we have to do anything special for dl-server
> > > > defer.
> > > > Those entities are started as throttled until 0-lag, so maybe
> > > > we
> > > > should still trace them explicitly as so?
> >
> > The naming might need a bit of a consistency check here, but for
> > the
> > monitor, the server is running, armed or preempted. Before the 0-
> > lag,
> > it will never be running, so it will stay as armed (fair tasks
> > running)
> > or preempted (rt tasks running).
> >
> > armed and preempted have the _throttled version just to indicate an
> > explicit throttle event occurred.
> >
> > We might want to start it in the armed_throttled if we are really
> > guaranteed not to see a throttle event, but I think that would
> > complicate the model considerably.
> >
> > We could instead validate the 0-lag concept in a separate, server-
> > specific model.
> >
> > Does this initial model feel particularly wrong for the server
> > case?
>
> No it doesn't atm. :-) Thanks for the additional information.
Perfect, I guess I need to write this a bit more clearly in the model
description.
>
> > > > In addition, since it's related, maybe we should do something
> > > > about
> > > > sched_switch event, that is currently not aware of deadlines,
> > > > runtimes, etc.
> >
> > I'm not sure I follow you here, what relation with switch and
> > runtime/deadline should we enforce?
> >
> > We don't really force the switch to occur timely after throttling,
> > is
> > that what you mean?
> > Or a switch must occur again timely after replenishing?
>
> Hummm, yeah I was wondering if we need something along these lines,
> but we can also maybe leave it for the future.
I'll have a thought about this, perhaps it's as simple as adding a few
more constraints on the edges.
>
> > > As per the whole _tp() thing, you can attach to the actual
> > > sched_switch tracepoint with a module and read whatever you want.
> >
> > Yeah I believe Juri referred to model constraints on the already
> > existing events rather than new tracepoints here.
>
> Separately from this series, maybe we should put such a module/bpf
> thing somewhere shared, so it's easier to use it when needed.
You mean some module/bpf to print those tracepoints to the ftrace
buffer? Yeah that might help, but it might be ugly and tracepoint-
specific.
Also perf probe doesn't support (yet) this type of tracepoints, but
once it does, I guess it would do the job quite nicely.
Thanks,
Gabriele
Powered by blists - more mailing lists