[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH RFC V6 0/11] Paravirtualized ticketlocks
- To: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>
- From: Avi Kivity <avi@xxxxxxxxxx>
- Date: Sun, 01 Apr 2012 16:53:19 +0300
- Cc: Marcelo Tosatti <mtosatti@xxxxxxxxxx>, KVM <kvm@xxxxxxxxxxxxxxx>, Alan Meadows <alan.meadows@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Andi Kleen <andi@xxxxxxxxxxxxxx>, Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Attilio Rao <attilio.rao@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stephan Diestelhorst <stephan.diestelhorst@xxxxxxx>
- Delivery-date: Sun, 01 Apr 2012 13:54:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On 04/01/2012 04:48 PM, Raghavendra K T wrote:
>>> I have patch something like below in mind to try:
>>>
>>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
>>> index d3b98b1..5127668 100644
>>> --- a/virt/kvm/kvm_main.c
>>> +++ b/virt/kvm/kvm_main.c
>>> @@ -1608,15 +1608,18 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
>>> * else and called schedule in __vcpu_run. Hopefully that
>>> * VCPU is holding the lock that we need and will release it.
>>> * We approximate round-robin by starting at the last boosted
>>> VCPU.
>>> + * Priority is given to vcpu that are unhalted.
>>> */
>>> - for (pass = 0; pass< 2&& !yielded; pass++) {
>>> + for (pass = 0; pass< 3&& !yielded; pass++) {
>>> kvm_for_each_vcpu(i, vcpu, kvm) {
>>> struct task_struct *task = NULL;
>>> struct pid *pid;
>>> - if (!pass&& i< last_boosted_vcpu) {
>>> + if (!pass&& !vcpu->pv_unhalted)
>>> + continue;
>>> + else if (pass == 1&& i< last_boosted_vcpu) {
>>> i = last_boosted_vcpu;
>>> continue;
>>> - } else if (pass&& i> last_boosted_vcpu)
>>> + } else if (pass == 2&& i> last_boosted_vcpu)
>>> break;
>>> if (vcpu == me)
>>> continue;
>>>
>>
>> Actually I think this is unneeded. The loops tries to find vcpus that
>> are runnable but not running (vcpu_active(vcpu->wq)), and halted vcpus
>> don't match this condition.
>>
>
>
> I almost agree. But at corner of my thought,
>
> Suppose there are 8 vcpus runnable out of which 4 of them are kicked
> but not running, making yield_to those 4 vcpus would result in better
> lock progress. no?
That's what the code does.
> I still have little problem getting PLE setup, here (instead
> rebasing patches).
> Once I get PLE to get that running, and numbers prove no improvement,
> I will drop this idea.
>
I'm interested in how PLE does vs. your patches, both with PLE enabled
and disabled.
--
error compiling committee.c: too many arguments to function
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel