> On 11 May 2002 08:25, Tim Schmielau wrote:
> > +static inline void init_jiffieswrap_timer(void)
> > +{
> > + init_timer(&jiffieswrap_timer);
> > + jiffieswrap_timer.expires = jiffies + CHECK_JIFFIESWRAP_INTERVAL;
> > + jiffieswrap_timer.function = check_jiffieswrap;
> > + add_timer(&jiffieswrap_timer);
> > +}
>
> I'm ignorant on the issue... does active timer mandate check for
> expiration at every timer tick?
No, timers are implemented in a highly efficient manner. The above
timer will just add O(1) cost to 4 table refills, meaning some 100 cycles
per quarter of a year.
> If yes, it is somewhat silly to use timer:
> such check would be more costly than
>
> if(!++jiffies) jiffies_hi++;
>
> (or similar) construct in timer int.
>
> BTW, I always liked above thing more that any other 64 jiffy solution.
> What's wrong with it?
It's slower than
jiffies_64++;
which went into Linus' tree yesterday :-)
Tim
-
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/