Re: [PATCH] change name of rep_nop

Paul Mackerras (paulus@samba.org)
Sat, 6 Oct 2001 11:40:57 +1000 (EST)


Martin J. Bligh writes:

> There *is* a race on x86 - the problem is that the primary cpu can
> get to reschedule_idle before the secondarys have done init_idle.
> I'm not claiming the way I fixed it is beautiful, but the race definitely
> exists (I hit it) and the patch makes the problem go away.

I meant that there isn't a race on x86 in pre4, now that we are using
your patch. I didn't mean to say that there wasn't a race on x86
before your patch went in.

There is a race on PPC with your patch, but I can fix that by removing
the init_idle() call from smp_callin() in arch/ppc/kernel/smp.c.
At a quick glance it looks like alpha and sparc (sun4m) may have the
same problem since they also call init_idle before waiting for
smp_commence() (or smp_threads_ready != 0).

> Sounds like rep_nop was the wrong way to spin - aplogies.

Well it was just that the name was a bit x86-centric, and a bit
non-obvious, even to people who know a bit of x86 assembly (one could
be forgiven for thinking that rep nop was a slow way to set CX to 0).

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