[lkml]   [2020]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch V2 01/17] x86/vdso: Mark the TSC clocksource path likely
Jumping out of line for the TSC clcoksource read is creating awful
code. TSC is likely to be the clocksource at least on bare metal and the PV
interfaces are sufficiently more work that the jump over the TSC read is
just in the noise.

Signed-off-by: Thomas Gleixner <>
arch/x86/include/asm/vdso/gettimeofday.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/include/asm/vdso/gettimeofday.h
+++ b/arch/x86/include/asm/vdso/gettimeofday.h
@@ -243,7 +243,7 @@ static u64 vread_hvclock(void)

static inline u64 __arch_get_hw_counter(s32 clock_mode)
- if (clock_mode == VCLOCK_TSC)
+ if (likely(clock_mode == VCLOCK_TSC))
return (u64)rdtsc_ordered();
* For any memory-mapped vclock type, we need to make sure that gcc
 \ /
  Last update: 2020-02-07 14:26    [W:0.184 / U:1.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site