android_kernel_samsung_msm8976/arch
Andi Kleen dda50e716d [PATCH] x86_64: Update TSC sync algorithm
The new TSC sync algorithm recently submitted did not work too well.

The result was that some MP machines where the TSC came up of the BIOS very
unsynchronized and that did not have HPET support were nearly unusable because
the time would jump forwards and backwards between CPUs.

After a lot of research ;-) and some more prototypes I ended up with just
using the one from IA64 which looks best.  It has some internal self tuning
that should adapt to changing interconnect latencies.  It holds up in my tests
so far.

I believe it was originally written by David Mosberger, I just ported it over
to x86-64.  See the inline comment for a description.

This cleans up the code because it uses smp_call_function for syncing instead
of having custom hooks in SMP bootup.

Please note that the cycle numbers it outputs are too optimistic because they
do not take into account the latency of WRMSR and RDTSC, which can be hundreds
of cycles.  It seems to be able to sync a dual Opteron to 200-300 cycles,
which is probably good enough.

There is a timing window during AP bootup where interrupts can see
inconsistent time before the TSC is synced.  It is hard to avoid unfortunately
because we can only do the TSC sync after some setup, and we need to enable
interrupts before that.  I just ignored it for now.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
..
alpha [PATCH] ISA DMA Kconfig fixes - part 1 2005-05-04 07:33:13 -07:00
arm [PATCH] ARM: Fix build error 2005-05-16 23:36:22 +01:00
arm26 [PATCH] ISA DMA Kconfig fixes - part 1 2005-05-04 07:33:13 -07:00
cris [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
frv [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
h8300 [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
i386 [PATCH] x86_64/i386: fix defaults for physical/core id in /proc/cpuinfo 2005-05-17 07:59:13 -07:00
ia64 [PATCH] ppc64: remove hidden -fno-omit-frame-pointer for schedule.c 2005-05-05 16:36:32 -07:00
m32r [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
m68k [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
m68knommu [PATCH] ISA DMA Kconfig fixes - part 1 2005-05-04 07:33:13 -07:00
mips Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-05-05 13:59:37 +01:00
parisc [PATCH] ISA DMA Kconfig fixes - part 1 2005-05-04 07:33:13 -07:00
ppc [PATCH] ppc32: Fix POWER3/POWER4 compiler error 2005-05-06 22:09:28 -07:00
ppc64 [PATCH] ppc64: enable CONFIG_RTAS_PROC by default 2005-05-06 22:09:27 -07:00
s390 Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-05-03 08:14:09 +01:00
sh [PATCH] ISA DMA Kconfig fixes - part 1 2005-05-04 07:33:13 -07:00
sh64 [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
sparc [SPARC]: Remove legacy stuff from cpu_idle(). 2005-05-05 14:53:01 -07:00
sparc64 [SPARC]: Remove legacy stuff from cpu_idle(). 2005-05-05 14:53:01 -07:00
um [PATCH] uml: change memcpy to memmove 2005-05-17 07:59:11 -07:00
v850 [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
x86_64 [PATCH] x86_64: Update TSC sync algorithm 2005-05-17 07:59:14 -07:00