From: Qais Yousef <qais.yousef@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
Pavankumar Kondeti <pkondeti@codeaurora.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Uwe Kleine-Konig <u.kleine-koenig@pengutronix.de>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Quentin Perret <quentin.perret@arm.com>
Subject: Re: [PATCH v2 6/7] sched: Add sched_overutilized tracepoint
Date: Mon, 13 May 2019 13:42:29 +0100 [thread overview]
Message-ID: <20190513124228.a2imudj6ji3khnfg@e107158-lin.cambridge.arm.com> (raw)
In-Reply-To: <20190513120830.GS2623@hirez.programming.kicks-ass.net>
On 05/13/19 14:08, Peter Zijlstra wrote:
> On Fri, May 10, 2019 at 12:30:12PM +0100, Qais Yousef wrote:
>
> > diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> > index cbcb47972232..0cf42d13d6c4 100644
> > --- a/include/trace/events/sched.h
> > +++ b/include/trace/events/sched.h
> > @@ -600,6 +600,10 @@ DECLARE_TRACE(pelt_se,
> > TP_PROTO(int cpu, const char *path, struct sched_entity *se),
> > TP_ARGS(cpu, path, se));
> >
> > +DECLARE_TRACE(sched_overutilized,
> > + TP_PROTO(int overutilized),
> > + TP_ARGS(overutilized));
> > +
> > #endif /* _TRACE_SCHED_H */
> >
> > /* This part must be outside protection */
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 81036c34fd29..494032220fe7 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -4965,8 +4965,10 @@ static inline bool cpu_overutilized(int cpu)
> >
> > static inline void update_overutilized_status(struct rq *rq)
> > {
> > - if (!READ_ONCE(rq->rd->overutilized) && cpu_overutilized(rq->cpu))
> > + if (!READ_ONCE(rq->rd->overutilized) && cpu_overutilized(rq->cpu)) {
> > WRITE_ONCE(rq->rd->overutilized, SG_OVERUTILIZED);
> > + trace_sched_overutilized(1);
> > + }
> > }
> > #else
> > static inline void update_overutilized_status(struct rq *rq) { }
> > @@ -8330,8 +8332,11 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
> >
> > /* Update over-utilization (tipping point, U >= 0) indicator */
> > WRITE_ONCE(rd->overutilized, sg_status & SG_OVERUTILIZED);
> > +
> > + trace_sched_overutilized(!!(sg_status & SG_OVERUTILIZED));
> > } else if (sg_status & SG_OVERUTILIZED) {
> > WRITE_ONCE(env->dst_rq->rd->overutilized, SG_OVERUTILIZED);
> > + trace_sched_overutilized(1);
> > }
> > }
>
> Note how the state is per root domain and the tracepoint doesn't
> communicate that.
Right! I can pass rd->span so that the probing function can use it to
differentiate the root domains if they care?
--
Qais Yousef
next prev parent reply other threads:[~2019-05-13 12:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 11:30 [PATCH v2 0/7] Add new tracepoints required for EAS testing Qais Yousef
2019-05-10 11:30 ` [PATCH v2 1/7] sched: autogroup: Make autogroup_path() always available Qais Yousef
2019-05-10 11:30 ` [PATCH v2 2/7] sched: fair: move helper functions into fair.h Qais Yousef
2019-05-10 11:30 ` [PATCH v2 3/7] sched: fair.h: add a new cfs_rq_tg_path() Qais Yousef
2019-05-10 11:30 ` [PATCH v2 4/7] sched: Add pelt_rq tracepoint Qais Yousef
2019-05-13 12:14 ` Peter Zijlstra
2019-05-13 12:48 ` Qais Yousef
2019-05-13 13:37 ` Dietmar Eggemann
2019-05-10 11:30 ` [PATCH v2 5/7] sched: Add pelt_se tracepoint Qais Yousef
2019-05-10 11:30 ` [PATCH v2 6/7] sched: Add sched_overutilized tracepoint Qais Yousef
2019-05-13 12:08 ` Peter Zijlstra
2019-05-13 12:42 ` Qais Yousef [this message]
2019-05-10 11:30 ` [PATCH v2 7/7] sched: export the newly added tracepoints Qais Yousef
2019-05-13 12:28 ` [PATCH v2 0/7] Add new tracepoints required for EAS testing Peter Zijlstra
2019-05-13 13:42 ` Qais Yousef
2019-05-13 15:06 ` Peter Zijlstra
2019-05-13 15:18 ` Qais Yousef
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=20190513124228.a2imudj6ji3khnfg@e107158-lin.cambridge.arm.com \
--to=qais.yousef@arm.com \
--cc=bigeasy@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=quentin.perret@arm.com \
--cc=rostedt@goodmis.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).