Re: [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 19/03/2014 17:58, Waiman Long ha scritto:
Exactly.  What you want is boot_cpu_has(X86_FEATURE_HYPERVISOR).

The unfair lock is to be enabled by boot time check, not just by the
presence of a configuration macro during the build process in order to
avoid using unfair lock on bare metal. Of course, Linux distros can
modify this if that suits their need.

"boot_cpu_has" is a run-time check. You can use it after setup_arch has called init_hypervisor_platform and kvm_guest_init. Can you just just check if the PV path has been enabled and, if not, do a static_key_inc to enable the unfair path?

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux