Re: [patch] jiffies wraparound [Re: 2.1.125 Show stopper list: Draft]

Olivier Galibert (galibert@pobox.com)
Sat, 24 Oct 1998 02:54:41 +0200


On Fri, Oct 23, 1998 at 05:44:57PM -0300, Paul Barton-Davis wrote:
> This is silly. Applications that use the kernel to provide a
> user-level clock via setitimer() are limited by the kernel value as
> is, and to say that even if the kernel value increases, they should
> never, ever try to take advantage of it seems strangely un-Linux like
> to me. Don't we want applications to be able to work as well as
> possible ? If I have a box capable of support HZ=1000, then my user
> level application can reasonably ask for an itimer of < 10ms. If the
> value of HZ=100, this makes no sense, and causes erratic timing
> behaviour in the application. Why is it so wrong to be able to ask
> "whats the minimum value for a timer that makes sense ?", which is
> effectively a function of HZ ?

The setitimer resolution is not defined to be HZ. It is perfectly
reasonable to think that in the future, with the increase of
soft-RTism in the kernel, timers will be automagically adapted to give
the best precision available to such timers.

Face it, HZ is obsolete. You don't want a 10ms (or 1ms) resolution on
everything you do anymore. You want the shortest possible latency on
events (which mainly means rescheduling after interrupts and/or IPCs)
for good interactive behaviour. You want long timeslices on
cpu-burning processes to reduce cache effects. You want precise
timers. Saying that HZ rules them all is innefficient.

What you can reasonably do in the scheduler heavily depends on the
hardware (cost of reprogramming the timer interrupt, interrupt
latency, cache sizes...) and on the software (amount of RT-ness used
by applications, use of special priorities...). Nowadays a fixed
length timer interrupt may be the most efficient way, but in some
years, the whole HZ concept may be gone. Do you really want to rely
on it in your applications?

OG.

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