[PATCH] disable addres space randomization default on transmeta CPUs
authorEric Lammerts <eric@lammerts.org>
Mon, 1 Aug 2005 05:34:42 +0000 (22:34 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 2 Aug 2005 02:13:59 +0000 (19:13 -0700)
We know that the randomisation slows down some workloads on Transmeta CPUs
by quite large amounts.  We think it's because the CPU needs to recode the
same x86 instructions when they pop up at a different virtual address after
a fork+exec.

So disable randomization by default on those CPUs.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/cpu/transmeta.c

index f57e5ee949435279b5d4bd52efa48161bfcc0f85..d8e59e1986751c7ff544c91fa2cac03420c94180 100644 (file)
@@ -76,6 +76,10 @@ static void __init init_transmeta(struct cpuinfo_x86 *c)
 #define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV)
         if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 )
                c->x86 = 6;
+
+       /* randomize_va_space slows us down enormously;
+          it probably triggers retranslation of x86->native bytecode */
+       randomize_va_space = 0;
 }
 
 static void transmeta_identify(struct cpuinfo_x86 * c)