Re: [PATCH v4 1/4] Produce system time from correlated clocksource

From: Thomas Gleixner
Date: Thu Oct 15 2015 - 04:16:57 EST


On Wed, 14 Oct 2015, Christopher Hall wrote:
> On Tue, 13 Oct 2015 12:42:52 -0700, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> wrote:
> > On Mon, 12 Oct 2015, Christopher S. Hall wrote:
> > > audio.
> >
> > This wants to be a seperate patch, really.
>
> OK. This makes sense, I'll do this the next time.
>
> > > +/* This needs to be 3 or greater for backtracking to be useful */
> >
> > Why?
>
> The current index points to a copy and the next may be being changed by
> update_wall_time(). Leaving n-2 entries available with useful history in them.
> I'll add more descriptive comments here.
>
> >
> > > +#define SHADOW_HISTORY_DEPTH 7
> >
> > And that number is 7 because?
>
> Due to power of 2 it will be 8 instead. As above the useful history is 8-2*1
> ms (1 ms is the minimum jiffy length). Array size 4 would not be enough
> history for the DSP which requires 4 ms of history, in the worst case.

And how exactly becomes 7 magically 8?

> >
> > What's the point of this? Why are you not making the few lines which
> > you can actually reuse a helper function and leave the PTP code alone?
>
> The audio driver is structured in such a way that it's simpler to provide a
> value rather than a callback. I changed this to allow the audio developers to
> provide an ART value as input. If a callback is provided, the resulting
> counter value is guaranteed to be later than cycle_last and there is no need
> to do extra checking (the goto skips that check). Is this an answer to your
> question?

Make it a seperate function which can hand in the information and
leave the PTP specific sample/conversion function alone.

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/