Re: is minimum udelay() not respected in preemptible SMP kernel-2.6.23?

Matt Mackall
2007-11-08T00:22:12Z

On Wed, Nov 07, 2007 at 12:30:45PM -0800, Andrew Morton wrote:
> Ow. Yes, from my reading delay_tsc() can return early (or after
> heat-death-of-the-universe) if the TSCs are offset and if preemption
> migrates the calling task between CPUs.
>
> I suppose a lameo fix would be to disable preemption in delay_tsc().

preempt_disable is lousy documentation here. This and other cases
(lots of per_cpu users, IIRC) actually want a migrate_disable() which
is a proper subset. We can simply implement migrate_disable() as
preempt_disable() for now and come back later and implement a proper
migrate_disable() that still allows preemption (and thus avoids the
latency).

--
Mathematics is the supreme nostalgia of our time.