Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700087

Re: [RFC] KVM: optimize the kvm_vcpu_on_spin

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC] KVM: optimize the kvm_vcpu_on_spin
Date 2017-07-31 16:30 +0200
Message-ID <u9jRN-7nb-9@gated-at.bofh.it> (permalink)
References <u8tqa-6KR-23@gated-at.bofh.it> <u9jf4-6U3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 31/07/2017 15:42, Marc Zyngier wrote:
>> If the vcpu(me) exit due to request a usermode spinlock, then
>> the spinlock-holder may be preempted in usermode or kernmode.
>> But if the vcpu(me) is in kernmode, then the holder must be
>> preempted in kernmode, so we should choose a vcpu in kernmode
>> as the most eligible candidate.
>
> That seems to preclude any form of locking between userspace and kernel
> (which probably wouldn't be Linux). Are you sure that this form of
> construct is not used anywhere? I have the feeling this patch could
> break this scenario...

It's just a heuristic; it would only be broken if you overcommit, and it
would be just as broken as if KVM didn't implement directed yield at all.

Paolo

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC] KVM: optimize the kvm_vcpu_on_spin "Longpeng(Mike)" <longpeng2@huawei.com> - 2017-07-29 08:30 +0200
  Re: [RFC] KVM: optimize the kvm_vcpu_on_spin David Hildenbrand <david@redhat.com> - 2017-07-31 13:40 +0200
    Re: [RFC] KVM: optimize the kvm_vcpu_on_spin "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-07-31 14:20 +0200
      Re: [RFC] KVM: optimize the kvm_vcpu_on_spin David Hildenbrand <david@redhat.com> - 2017-07-31 14:30 +0200
        Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Paolo Bonzini <pbonzini@redhat.com> - 2017-07-31 15:30 +0200
          Re: [RFC] KVM: optimize the kvm_vcpu_on_spin "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-08-01 05:30 +0200
            Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Paolo Bonzini <pbonzini@redhat.com> - 2017-08-01 10:40 +0200
      Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Cornelia Huck <cohuck@redhat.com> - 2017-07-31 14:40 +0200
        Re: [RFC] KVM: optimize the kvm_vcpu_on_spin "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-07-31 15:10 +0200
  Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Christoffer Dall <cdall@linaro.org> - 2017-07-31 15:30 +0200
    Re: [RFC] KVM: optimize the kvm_vcpu_on_spin David Hildenbrand <david@redhat.com> - 2017-07-31 19:40 +0200
      Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Cornelia Huck <cohuck@redhat.com> - 2017-08-01 09:00 +0200
    Re: [RFC] KVM: optimize the kvm_vcpu_on_spin "Longpeng (Mike)" <longpeng2@huawei.com> - 2017-08-01 04:30 +0200
  Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Marc Zyngier <marc.zyngier@arm.com> - 2017-07-31 15:50 +0200
    Re: [RFC] KVM: optimize the kvm_vcpu_on_spin Paolo Bonzini <pbonzini@redhat.com> - 2017-07-31 16:30 +0200

csiph-web