linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Enable PV qspinlock for Hyper-V
@ 2018-09-13  9:13 Yi Sun
  2018-09-13  9:13 ` [PATCH v1 1/3] X86/Hyper-V: Add Guest IDLE MSR support Yi Sun
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Yi Sun @ 2018-09-13  9:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, chao.p.peng, chao.gao, isaku.yamahata, michael.h.kelly,
	tianyu.lan, Yi Sun, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Jonathan Corbet

This patch adds the necessary Hyper-V specific code to allow
PV qspinlock work on Hyper-V.

In wait callback function, read HV_X64_MSR_GUEST_IDLE MSR
to trigger the guest's transition to the idle power state
which can be exited by an IPI even if IF flag is disabled.
Beside that, make HVCALL_NOTIFY_LONG_SPIN_WAIT hypervall to
notify the hypervisor that the calling virtual processor is
attempting to acquire a resource that is potentially held
by another virtual processor within the same partition. This
scheduling hint improves the scalability of partitions with
more than one virtual processor.

In kick callback function, just send platform IPI to make
waiting vcpu exit idle state.

In vcpu_is_preempted callback function, return false directly
because Hyper-V does not provide such interface so far.


Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Jonathan Corbet <corbet@lwn.net>

Yi Sun (3):
  X86/Hyper-V: Add Guest IDLE MSR support
  locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V
  hv: add description for hv_nopvspin

 Documentation/admin-guide/kernel-parameters.txt |  5 ++
 arch/x86/hyperv/Makefile                        |  2 +-
 arch/x86/hyperv/hv_spinlock.c                   | 99 +++++++++++++++++++++++++
 arch/x86/include/asm/hyperv-tlfs.h              |  5 ++
 arch/x86/include/asm/mshyperv.h                 |  3 +
 arch/x86/kernel/smpboot.c                       |  2 +
 6 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 arch/x86/hyperv/hv_spinlock.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-09-20  1:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13  9:13 [PATCH v1 0/3] Enable PV qspinlock for Hyper-V Yi Sun
2018-09-13  9:13 ` [PATCH v1 1/3] X86/Hyper-V: Add Guest IDLE MSR support Yi Sun
2018-09-13  9:13 ` [PATCH v1 2/3] locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V Yi Sun
2018-09-13 11:06   ` Thomas Gleixner
2018-09-14  8:53     ` Yi Sun
2018-09-13 11:24   ` Thomas Gleixner
2018-09-14  9:04     ` Yi Sun
2018-09-14 10:42       ` Thomas Gleixner
2018-09-17 12:54         ` Yi Sun
2018-09-20  1:56           ` Yi Sun
2018-09-13 16:16   ` kbuild test robot
2018-09-13 16:42   ` kbuild test robot
2018-09-13  9:13 ` [PATCH v1 3/3] hv: add description for hv_nopvspin Yi Sun
2018-09-15 23:43 ` [PATCH v1 0/3] Enable PV qspinlock for Hyper-V Michael Kelley (EOSG)
2018-09-17 14:37   ` Yi Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).