Re: [RFC][PATCH] perf: Rewrite enabled/running timekeeping
From: Peter Zijlstra
Date: Mon Sep 04 2017 - 11:43:01 EST
On Mon, Sep 04, 2017 at 05:56:06PM +0300, Alexey Budankov wrote:
> On 04.09.2017 15:08, Peter Zijlstra wrote:
> > On Mon, Sep 04, 2017 at 01:46:45PM +0300, Alexey Budankov wrote:
> >>> So the below completely rewrites timekeeping (and probably breaks
> >>> world) but does away with the need to touch events that don't get
> >>> scheduled.
> >>
> >> We still need and do iterate thru all events at some points e.g. on context switches.
> >
> > Why do we _need_ to?
>
> We do so in the current implementation with several tstamp_* fields.
Right, but we want to stop doing so asap :-)
> >> U - allocation, A - ACTIVE, I - INACTIVE, O - OFF,
> >> E - ERROR, X - EXIT, D - DEAD,
> >
> > Not sure we care about the different <0 values, they're all effectively
> > OFF.
>
> We still need to care about proper initial state of timings when moving above >=0 state.
Very true. I'm not sure I fully covered that, let me see if there's
something sensible to do for that.