Re: [PATCH] ia64: disable preemption in udelay()

From: Luck, Tony <>
Date: 2005-12-17 04:33:42
On Fri, Dec 16, 2005 at 06:28:54AM -0600, Robin Holt wrote:
> > +#define SMALLUSECS 100
> John, I did not see your posts until this had already made it out.
> I would think that the folks running realtime applications would expect
> udelay to hold off for even shorter periods of time.  I would expect
> something along the line of 20 or 25 uSec.

A good question ... I'm going to put John's change in as-is for now so
that 2.6.15 can benefit from the reduced code size of the out-of-line
and avoid the ugly bug when preemption is enabled on a drifty system.

We can make fine tune changes to the udelay() implementation after we
get some data on what is needed.

> How much drift would you expect from this?  I have not tried this, but
> what about something more along the lines of:

As we reduce the non-preemtible window drift in my version of udelay()
would get worse ... but I haven't done any measurements on how much worse.

> 		timeout += next * local_cpu_data->cyc_per_usec;
> 		while (ia64_get_itc() < timeout)
> 			cpu_relax();

Bad news if your ar.itc wraps around (less than four centuries of uptime
at 1.6GHz :-)

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Sat Dec 17 04:34:29 2005

This archive was generated by hypermail 2.1.8 : 2005-12-17 04:34:38 EST