Re: [patch] SMP alternatives

From: Andi Kleen
Date: Wed Nov 23 2005 - 11:38:50 EST

On Wed, Nov 23, 2005 at 04:42:13PM +0000, Alan Cox wrote:
> On Mer, 2005-11-23 at 12:17 -0700, Andi Kleen wrote:
> > > + /* Paranoia */
> > > + asm volatile ("jmp 1f\n1:");
> > > + mb();
> >
> > That would be totally obsolete 386 era paranoia. If anything then use
> > a CLFLUSH (but not available on all x86s)
> If you are patching code another x86 CPU is running you must halt the
> other processors and ensure it executes a serialzing instruction before
> it enters any patched code.

Yes that is why the original alternative() mechanism always only
runs before the code is ever executed.

> How many kilobytes of tables do you add to the kernel to do this
> pointless stunt btw ?

I much prefer the MSR bit too. Unfortunately it doesn't exist
(or rather I bet it exists somewhere, just undocumented) on Intel

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at