Re: [PATCH NET-NEXT 01/10] clocksource: allow usage independent oftimekeeping.c

From: Daniel Walker
Date: Wed Feb 04 2009 - 19:18:31 EST


On Wed, 2009-02-04 at 13:15 -0800, john stultz wrote:
> On Wed, 2009-02-04 at 13:04 -0800, Daniel Walker wrote:
> > On Wed, 2009-02-04 at 12:06 -0800, john stultz wrote:
> >
> > > The duplication is only at a very low level. He could not reuse the
> > > established clocksource system without really breaking its semantics.
> >
> > He gave a link to the first version,
> >
> > http://kerneltrap.org/mailarchive/linux-netdev/2008/11/19/4164204
> >
> > What specific semantics is he breaking there?
>
> His re-usage of cycle_last and xtime_nsec for other means then how
> they're defined.
>
> In that case his use of xtime_nsec doesn't even store the same unit.

Those values to me are timekeeping ornaments .. It's not part of the
clocksource it's stuff you added from timekeeping. He could easily add
his own ornaments to the clocksource instead of re-use , then they could
be merged later .. It's not perfect, but it's at least a start.

> Plus he adds other accessors to the clocksource structure that are not
> compatible with the clocksources registered for timekeeping.

It's akin to vread, I think. I'd prefer to see the read() used instead,
but I can see why there could be a need for a structure getting passed.

> He's really doing something different here, and while it does access a
> counter, and it does translate that into nanoseconds, its not the same
> as whats done in the timekeeping core which the clocksource was designed
> around.

I think it's different from _timekeeping_. However the clocksource isn't
getting used differently. Like you said the lowlevel parts are the same,
ultimately that's all the clocksource should be.

It sounds like that's what you want anyway .. You can merge the lowlevel
parts with different sets of ornaments, that seems fairly acceptable to
me.

Daniel

--
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/