Re: udelay() & preemption & drifty ITCs

From: Jesse Barnes <jbarnes_at_sgi.com>
Date: 2003-11-25 09:21:54
On Mon, Nov 24, 2003 at 04:01:31PM -0600, Jack Steiner wrote:
> I dislike disabling preemption in udelay(). Although most delays are
> short, there are some delays that are 100s or 1000s of usec long. Users running
> soft-realtime really dont want preemption disabled unnecessarily.
>
> On platforms with synchronized clocks, disabling preemption is not required. 

Yeah, I thought about this too, but unless we have a global flag telling
us if itcs drift or not, it seems lik we have to unconditionally disable
preemption.

> Even on platforms with drifty ITCs, preemption in udelay() is ok as long 
> as migration is disabled. AFAIK, there is no standard API for disabling 
> migration aside from saving/changing/restoring the cpus_allowed mask.

Then we'd have to check if drifty itcs were present and also check to
see if the process was pinned...

If we found enough code that depended on having preemption disabled
because of itc drift, it might be worthwhile to add another inline to
deal with it.  As for CPU pinning, maybe we could check in
preempt_disable() whether the cpus_allowed mask only had one bit
set--that would prevent us from disabling preemption at all for pinned
processes, right?

Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Nov 24 17:26:07 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:20 EST