Skip to content

RFC x86/vdso: Add Hyper-V TSC page clocksource support

Vitaly Kuznetsov lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hyperv: implement hv_get_tsc_page()arch/x86/hyperv/hv_init.c arch/x86/include/asm/mshyperv.h drivers/hv/Kconfig+18 -00 replies
1/2hyperv: implement hv_get_tsc_page()arch/x86/hyperv/hv_init.c arch/x86/include/asm/mshyperv.h drivers/hv/Kconfig+18 -00 replies
2/2x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read methodarch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vdso/vma.c arch/x86/hyperv/hv_init.c +1 more+72 -80 replies
2/2x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read methodarch/x86/entry/vdso/vclock_gettime.c arch/x86/entry/vdso/vma.c arch/x86/hyperv/hv_init.c +1 more+72 -84 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/2] x86/vdso: Add Hyper-V TSC page clocksource support

Hi,

Hyper-V TSC page clocksource is suitable for vDSO, however, the protocol defined by the hypervisor is different from VCLOCK_PVCLOCK. I implemented the required support re-using pvclock_page VVAR. Simple sysbench test shows the following results:

Before:

# time sysbench --test=memory --max-requests=500000 run
...
real    1m22.618s
user    0m50.193s
sys     0m32.268s

After:

# time sysbench --test=memory --max-requests=500000 run
...
real    0m50.218s
user    0m50.171s
sys     0m0.016s

So it seems it is worth it. What do you think?

Vitaly Kuznetsov (2):
hyperv: implement hv_get_tsc_page() x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

 arch/x86/entry/vdso/vclock_gettime.c | 48 ++++++++++++++++++++++++++++++++++++
 arch/x86/entry/vdso/vma.c            | 26 +++++++++++++------
 arch/x86/hyperv/hv_init.c            |  8 ++++++
 arch/x86/include/asm/clocksource.h   |  3 ++-
 arch/x86/include/asm/mshyperv.h      |  8 ++++++
 drivers/hv/Kconfig                   |  5 ++++
 6 files changed, 90 insertions(+), 8 deletions(-)
Signature · 1 line
2.9.3