lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250819143823.GB282929@pauld.westford.csb>
Date: Tue, 19 Aug 2025 10:38:23 -0400
From: Phil Auld <pauld@...hat.com>
To: Juri Lelli <juri.lelli@...hat.com>
Cc: Gabriele Monaco <gmonaco@...hat.com>,
	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


Hi Juri,

On Tue, Aug 19, 2025 at 04:02:04PM +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.
> 
> > > > 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.
> 
> > > > 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.
> 
> > > 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.
> 
> 

A few of us use: https://github.com/qais-yousef/sched_tp.git

This has all the current scheduler raw tps exposed, I believe, but would
need updates for these new ones, of course. 

I have a gitlab fork with our perf team uses to get at the ones they use
(mostly the nr_running ones to make their heat maps).

Fwiw...



Cheers,
Phil

-- 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ