Re: [PATCH RFC V2 5/5] kvm guest : pv-ticketlocks support for linux guests running on KVM hypervisor

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

 



On 10/26/2011 12:23 PM, Raghavendra K T wrote:
> On 10/26/2011 12:04 AM, Jeremy Fitzhardinge wrote:
>> On 10/23/2011 12:07 PM, Raghavendra K T wrote:
>>> This patch extends Linux guests running on KVM hypervisor to support
>>> +/*
>>> + * Setup pv_lock_ops to exploit KVM_FEATURE_WAIT_FOR_KICK if present.
>>> + * This needs to be setup really early in boot, before the first
>>> call to
>>> + * spinlock is issued!
>>
>> Actually, it doesn't matter that much.  The in-memory format is the same
>> for regular and PV spinlocks, and the PV paths only come into play if
>> the "slowpath" flag is set in the lock, which it never will be by the
>> non-PV code.
>>
>> In principle, you could defer initializing PV ticketlocks until some
>> arbitrarily late point if you notice that the system is oversubscribed
>> enough to require it.
>
> ok.. so this means it will not affect even if it is initialized in
> middle somewhere, but better to do it before we start seeing lock
> contention.

Right.  Or more specifically, lock contention while you have VCPU
overcommit.

> our current aim was to have before any printk happens.
> So I  'll trim the comment to somethings like :
>
> Setup pv_lock_ops to exploit KVM_FEATURE_WAIT_FOR_KICK if present.
> This needs to be setup early in boot. ?

You can hook the smp_ops.smp_prepare_cpus call and initialize it there. 
There's no need to add new hook code.

    J
--
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