Re: PC speaker driver patch for 2.4.0-test10-pre3

From: Oliver Xymoron (oxymoron@waste.org)
Date: Mon Oct 23 2000 - 12:10:27 EST


On Mon, 23 Oct 2000, David Woodhouse wrote:

>
> oxymoron@waste.org said:
> > You can also pretty trivially keep track of an error term so that the
> > clock is right on average:
>
> True, but I don't want 'right on average'. I want 'not screwed with at all'.
> Shifting the timer tick onto the RTC will give me that.
>
> Even if we _do_ get the maths right, fudging with the frequency of the
> system timer is still an ugly hack.

I personally think the system timer is already an ugly hack. HZ is
arbitrary, slow by modern standards, and introduces latency.
As the comment you quoted points out, it's also not very accurate.
Much better would be an agenda structure with one shot timers between
events and jiffies based on cycle counters. This works on modern hardware
and scales well for higher processor speeds.

As for the current inaccuracy, the jitter introduced by using an error
term can never be more than a single real interrupt cycle, which is
already well below the average userspace latency.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

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



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:21 EST