From: Peter Zijlstra <peterz@infradead.org>
To: Qais Yousef <qais.yousef@arm.com>
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 v3 5/6] sched: Add sched_overutilized tracepoint
Date: Mon, 17 Jun 2019 17:50:10 +0200 [thread overview]
Message-ID: <20190617155010.GH3436@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190604111459.2862-6-qais.yousef@arm.com>
On Tue, Jun 04, 2019 at 12:14:58PM +0100, Qais Yousef wrote:
> The new tracepoint allows us to track the changes in overutilized
> status.
>
> Overutilized status is associated with EAS. It indicates that the system
> is in high performance state. EAS is disabled when the system is in this
> state since there's not much energy savings while high performance tasks
> are pushing the system to the limit and it's better to default to the
> spreading behavior of the scheduler.
>
> This tracepoint helps understanding and debugging the conditions under
> which this happens.
>
> Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> ---
> include/trace/events/sched.h | 4 ++++
> kernel/sched/fair.c | 11 +++++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index c7dd9bc7f001..edd96e04049f 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -621,6 +621,10 @@ DECLARE_TRACE(pelt_se_tp,
> TP_PROTO(struct sched_entity *se),
> TP_ARGS(se));
>
> +DECLARE_TRACE(sched_overutilized_tp,
> + TP_PROTO(int overutilized, struct root_domain *rd),
> + TP_ARGS(overutilized, rd));
> +
strictly speaking you only need @rd :-)
> #endif /* _TRACE_SCHED_H */
>
> /* This part must be outside protection */
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 8e0015ebf109..e2418741608e 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5179,8 +5179,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_tp(1, rq->rd);
> + }
> }
> #else
> static inline void update_overutilized_status(struct rq *rq) { }
> @@ -8542,8 +8544,13 @@ 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_tp(!!(sg_status & SG_OVERUTILIZED), rd);
> } else if (sg_status & SG_OVERUTILIZED) {
> - WRITE_ONCE(env->dst_rq->rd->overutilized, SG_OVERUTILIZED);
> + struct root_domain *rd = env->dst_rq->rd;
> +
> + WRITE_ONCE(rd->overutilized, SG_OVERUTILIZED);
> + trace_sched_overutilized_tp(1, rd);
> }
> }
But I figure since we need both values anyway, this isn't too much of a
bother.
I'm going to flip the argument order though.
next prev parent reply other threads:[~2019-06-17 15:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 11:14 [PATCH v3 0/6] sched: Add new tracepoints required for EAS testing Qais Yousef
2019-06-04 11:14 ` [PATCH v3 1/6] sched: autogroup: Make autogroup_path() always available Qais Yousef
2019-06-25 8:24 ` [tip:sched/core] sched/autogroup: " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 2/6] sched: add a new sched_trace_*() helper functions Qais Yousef
2019-06-25 8:25 ` [tip:sched/core] sched/debug: Add " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 3/6] sched: Add new tracepoints to track pelt at rq level Qais Yousef
2019-06-25 8:26 ` [tip:sched/core] sched/debug: Add new tracepoints to track PELT " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 4/6] sched: Add new tracepoint to track pelt at se level Qais Yousef
2019-06-25 8:27 ` [tip:sched/core] sched/debug: Add new tracepoint to track PELT " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 5/6] sched: Add sched_overutilized tracepoint Qais Yousef
2019-06-17 15:50 ` Peter Zijlstra [this message]
2019-06-17 16:31 ` Qais Yousef
2019-06-25 8:27 ` [tip:sched/core] sched/debug: " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 6/6] sched: export the newly added tracepoints Qais Yousef
2019-06-25 8:28 ` [tip:sched/core] sched/debug: Export " tip-bot for Qais Yousef
2019-06-05 6:17 ` [PATCH v3 0/6] sched: Add new tracepoints required for EAS testing Christoph Hellwig
2019-06-05 7:22 ` Peter Zijlstra
2019-06-05 22:33 ` Qais Yousef
2019-06-17 12:51 ` Qais Yousef
2019-06-17 15:55 ` Peter Zijlstra
2019-06-17 16:22 ` 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=20190617155010.GH3436@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pkondeti@codeaurora.org \
--cc=qais.yousef@arm.com \
--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).