linux/init
Andi Kleen ca74a6f84e x86: optimize lock prefix switching to run less frequently
On VMs implemented using JITs that cache translated code changing the lock
prefixes is a quite costly operation that forces the JIT to throw away and
retranslate a lot of code.

Previously a SMP kernel would rewrite the locks once for each CPU which
is quite unnecessary. This patch changes the code to never switch at boot in
 the normal case (SMP kernel booting with >1 CPU) or only once for SMP kernel
on UP.

This makes a significant difference in boot up performance on AMD SimNow!
Also I expect it to be a little faster on native systems too because a smp
switch does a lot of text_poke()s which each synchronize the pipeline.

v1->v2: Rename max_cpus
v1->v2: Fix off by one in UP check (Thomas Gleixner)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:33:17 +01:00
..
Kconfig kconfig: use environment option 2008-01-28 23:14:39 +01:00
Makefile kbuild: enable 'make CFLAGS=...' to add additional options to CC 2007-10-14 22:21:35 +02:00
calibrate.c slow down printk during boot 2007-10-16 09:42:49 -07:00
do_mounts.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 2008-01-25 08:44:29 -08:00
do_mounts.h Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
do_mounts_initrd.c Freezer: Fix s2disk resume from initrd 2007-11-20 22:22:42 -05:00
do_mounts_md.c [PATCH] md: remove MAX_MD_DEVS which is an arbitrary limit 2006-10-03 08:04:18 -07:00
do_mounts_rd.c sparse pointer use of zero as null 2007-10-18 14:37:31 -07:00
initramfs.c initramfs: missing __init 2007-07-26 11:11:56 -07:00
main.c x86: optimize lock prefix switching to run less frequently 2008-01-30 13:33:17 +01:00
noinitramfs.c [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
version.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00