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
| ||
|
Date: Mon, 13 May 2019 14:08:30 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Qais Yousef <qais.yousef@....com> Cc: Ingo Molnar <mingo@...hat.com>, Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org, Pavankumar Kondeti <pkondeti@...eaurora.org>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Uwe Kleine-Konig <u.kleine-koenig@...gutronix.de>, Dietmar Eggemann <dietmar.eggemann@....com>, Quentin Perret <quentin.perret@....com> Subject: Re: [PATCH v2 6/7] sched: Add sched_overutilized tracepoint 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.
Powered by blists - more mailing lists