WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH RFC V2 5/5] kvm guest : pv-ticketlocks support fo

To: Raghavendra K T <raghukt@xxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH RFC V2 5/5] kvm guest : pv-ticketlocks support for linux guests running on KVM hypervisor
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Wed, 26 Oct 2011 12:46:15 -0700
Cc: "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, KVM <kvm@xxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Avi Kivity <avi@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>, Sedat Dilek <sedat.dilek@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Suzuki Poulose <suzuki@xxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 27 Oct 2011 05:06:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4EA85E32.3080107@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20111023190307.16364.35381.sendpatchset@xxxxxxxxxxxxxxxxxxxx> <20111023190753.16364.31164.sendpatchset@xxxxxxxxxxxxxxxxxxxx> <4EA7012B.5040808@xxxxxxxx> <4EA85E32.3080107@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>