Re: adding accuracy to random timers on PPC - new config option or runtime overhead?

From: Ignacio Vazquez-Abrams (ignacio@openservices.net)
Date: Wed Aug 22 2001 - 12:57:31 EST


On Wed, 22 Aug 2001, Chris Friesen wrote:

> Ignacio Vazquez-Abrams wrote:
> >
> > On Wed, 22 Aug 2001, Chris Friesen wrote:
> > > I'm looking at putting in PPC-specific code in add_timer_randomness() that would
> > > be similar to the x86-specific stuff.
> > >
> > > The problem is that the PPC601 uses real time clock registers while the other
> > > PPC chips use a timebase register, so two different versions will be required.
> > > Should I try and identify at runtime which it is (which would be extra
> > > overhead), or should I add another config option to the kernel?
>
> > How about determining which one to use at boot time? That way there's no
> > overhead, and there's no need to have yet another config option which probably
> > doesn't need to be there.
>
> As far as I can see there will still be some extra overhead. We'd need an extra
> conditional that wouldn't be there with the config option. Granted, one
> conditional shouldn't be too expensive, especially since we'll always be picking
> the same branch.

If the versions of the functions aren't too large then you may be able to get
away with putting in both functions and then using a function pointer to
select which one to use.

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>

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



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:50 EST