linux/arch
Andy Lutomirski 057e6a8c66 x86-64: Remove unnecessary barrier in vread_tsc
RDTSC is completely unordered on modern Intel and AMD CPUs.  The
Intel manual says that lfence;rdtsc causes all previous instructions
to complete before the tsc is read, and the AMD manual says to use
mfence;rdtsc to do the same thing.

From a decent amount of testing [1] this is enough to make rdtsc
be ordered with respect to subsequent loads across a wide variety
of CPUs.

On Sandy Bridge (i7-2600), this improves a loop of
clock_gettime(CLOCK_MONOTONIC) by more than 5 ns/iter.

[1] https://lkml.org/lkml/2011/4/18/350

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Borislav Petkov <bp@amd64.org>
Link: http://lkml.kernel.org/r/%3C1c158b9d74338aa5361f96dd473d0e6a58235302.1306156808.git.luto%40mit.edu%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-05-24 14:51:28 +02:00
..
alpha Merge commit '317f394160e9beb97d19a84c39b7e5eb3d7815a8' 2011-05-20 13:10:22 -07:00
arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-23 15:15:27 -07:00
avr32 PM / AVR32: Use struct syscore_ops instead of sysdevs for PM 2011-05-11 21:37:14 +02:00
blackfin Merge commit '317f394160e9beb97d19a84c39b7e5eb3d7815a8' 2011-05-20 13:10:22 -07:00
cris Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
frv Fix common misspellings 2011-03-31 11:26:23 -03:00
h8300 genirq: Remove the now obsolete config options and select statements 2011-03-30 14:13:23 +02:00
ia64 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
m32r extable, core_kernel_data(): Make sure all archs define _sdata 2011-05-20 08:56:56 +02:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
microblaze Merge branch 'consolidate-clksrc-i8253' of master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource 2011-05-14 12:06:36 +02:00
mips Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-05-23 12:33:02 -07:00
mn10300 sched: Provide scheduler_ipi() callback in response to smp_send_reschedule() 2011-04-14 08:52:32 +02:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 2011-05-22 12:38:40 -07:00
powerpc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
score Fix common misspellings 2011-03-31 11:26:23 -03:00
sh sh: Ignore R_SH_NONE module relocations. 2011-05-23 17:09:30 +09:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6 2011-05-22 22:06:24 -07:00
tile sched: Provide scheduler_ipi() callback in response to smp_send_reschedule() 2011-04-14 08:52:32 +02:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
unicore32 Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-05-19 18:24:11 -07:00
x86 x86-64: Remove unnecessary barrier in vread_tsc 2011-05-24 14:51:28 +02:00
xtensa Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
.gitignore
Kconfig arch:Kconfig.locks Remove unused config option. 2011-04-10 17:01:05 +02:00