Re: [PATCH v2 0/7] Add new tracepoints required for EAS testing

From: Qais Yousef
Date: Mon May 13 2019 - 11:20:24 EST


On 05/13/19 17:06, Peter Zijlstra wrote:
> On Mon, May 13, 2019 at 02:42:03PM +0100, Qais Yousef wrote:
> > On 05/13/19 14:28, Peter Zijlstra wrote:
> > >
> > >
> > > diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> > > index c8c7c7efb487..11555f95a88e 100644
> > > --- a/include/trace/events/sched.h
> > > +++ b/include/trace/events/sched.h
> > > @@ -594,6 +594,23 @@ TRACE_EVENT(sched_wake_idle_without_ipi,
> > >
> > > TP_printk("cpu=%d", __entry->cpu)
> > > );
> > > +
> > > +/*
> > > + * Following tracepoints are not exported in tracefs and provide hooking
> > > + * mechanisms only for testing and debugging purposes.
> > > + */
> > > +DECLARE_TRACE(pelt_cfs_rq,
> > > + TP_PROTO(struct cfs_rq *cfs_rq),
> > > + TP_ARGS(cfs_rq));
> > > +
> > > +DECLARE_TRACE(pelt_se,
> > > + TP_PROTO(struct sched_entity *se),
> > > + TP_ARGS(se));
> > > +
> > > +DECLARE_TRACE(sched_overutilized,
> > > + TP_PROTO(int overutilized),
> > > + TP_ARGS(overutilized));
> > > +
> >
> > If I decoded this patch correctly, what you're saying:
> >
> > 1. Move struct cfs_rq to the exported sched.h header
>
> No, don't expose the structure, we want to keep that private. You can
> use unqualified pointers.
>
> > 2. Get rid of the fatty wrapper functions and export any necessary
> > helper functions.
>
> Right, that should get them read-only access to the members of those
> structures and avoids the tracing code itself from becoming ugleh and
> also avoids us having to export those structures (which we really don't
> want to do).
>
> > 3. No need for RT and DL pelt tracking at the moment.
>
> Nah, you probably want rt,dl,irq (as Dietmar pointed out), it's just
> that your patched didn't do it right and I was lazy.
>
> > I'm okay with this. The RT and DL might need to be revisited later but we don't
> > have immediate need for them now.
> >
> > I'll add to this passing rd->span to sched_overutilizied.
>
> Or pass the rd itself and add another wrapper to extract the span.

Ok got ya. Will do.

Thanks

--
Qais Yousef