[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090303195401.GA2654@cmpxchg.org>
Date: Tue, 3 Mar 2009 20:54:01 +0100
From: Johannes Weiner <hannes@...xchg.org>
To: Daniel Walker <dwalker@...o99.com>
Cc: Johannes Weiner <jw@...ix.com>, Chris Zankel <chris@...kel.net>,
linux-kernel@...r.kernel.org
Subject: Re: [patch 3/3] xtensa: ccount clocksource
On Tue, Mar 03, 2009 at 09:55:45AM -0800, Daniel Walker wrote:
> On Tue, 2009-03-03 at 16:30 +0100, Johannes Weiner wrote:
> > @ -29,6 +30,19 @@ unsigned long ccount_per_jiffy; /* per
> > unsigned long nsec_per_ccount; /* nsec per ccount increment
> > */
> > #endif
> >
> > +static cycle_t ccount_read(void)
> > +{
> > + return (cycle_t)get_ccount();
> > +}
> > +
> > +static struct clocksource ccount_clocksource = {
> > + .name = "ccount",
> > + .rating = 200,
> > + .read = ccount_read,
> > + .mask = CLOCKSOURCE_MASK(32),
> > + .mult = NSEC_PER_CCOUNT,
> > +};
>
> You don't want to use the shift field?
Thanks for pointing it out.
To make sure I understood this:
If shift is 0, then a walltime adjustment would be done in 1/2^0
steps, meaning an adjustment of counting one nanosecond more or less
per ccount.
To give this a finer granularity and smooth out adjustments, the shift
should be a trade-off between too much adjustment and no adjustment
progress in a sane amount of time (and, of course, to stay within
bounds of the used type).
Does that make sense?
I found a patch of yours that introduced clocksource_hz2shift() but it
seems it hasn't been merged (yet). Is it yet to get integrated?
Thanks in advance,
Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists