mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
clocksource/drivers/hyperv: Enable TSC page clocksource on 32bit
There is no particular reason to not enable TSC page clocksource on 32-bit. mul_u64_u64_shr() is available and despite the increased computational complexity (compared to 64bit) TSC page is still a huge win compared to MSR-based clocksource. In-kernel reads: MSR based clocksource: 3361 cycles TSC page clocksource: 49 cycles Reads from userspace (utilizing vDSO in case of TSC page): MSR based clocksource: 5664 cycles TSC page clocksource: 131 cycles Enabling TSC page on 32bits allows to get rid of CONFIG_HYPERV_TSCPAGE as it is now not any different from CONFIG_HYPERV_TIMER. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lkml.kernel.org/r/20190822083630.17059-1-vkuznets@redhat.com
This commit is contained in:
committed by
Thomas Gleixner
parent
bd00cd52d5
commit
3e2d94535a
@@ -28,12 +28,10 @@ extern void hv_stimer_cleanup(unsigned int cpu);
|
||||
extern void hv_stimer_global_cleanup(void);
|
||||
extern void hv_stimer0_isr(void);
|
||||
|
||||
#if IS_ENABLED(CONFIG_HYPERV)
|
||||
#ifdef CONFIG_HYPERV_TIMER
|
||||
extern struct clocksource *hyperv_cs;
|
||||
extern void hv_init_clocksource(void);
|
||||
#endif /* CONFIG_HYPERV */
|
||||
|
||||
#ifdef CONFIG_HYPERV_TSCPAGE
|
||||
extern struct ms_hyperv_tsc_page *hv_get_tsc_page(void);
|
||||
|
||||
static inline notrace u64
|
||||
@@ -91,7 +89,7 @@ hv_read_tsc_page(const struct ms_hyperv_tsc_page *tsc_pg)
|
||||
return hv_read_tsc_page_tsc(tsc_pg, &cur_tsc);
|
||||
}
|
||||
|
||||
#else /* CONFIG_HYPERV_TSC_PAGE */
|
||||
#else /* CONFIG_HYPERV_TIMER */
|
||||
static inline struct ms_hyperv_tsc_page *hv_get_tsc_page(void)
|
||||
{
|
||||
return NULL;
|
||||
@@ -102,6 +100,6 @@ static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg,
|
||||
{
|
||||
return U64_MAX;
|
||||
}
|
||||
#endif /* CONFIG_HYPERV_TSCPAGE */
|
||||
#endif /* CONFIG_HYPERV_TIMER */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user