mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	"Longpeng(Mike)" <longpeng2@huawei.com>,
	rkrcmar@redhat.com
Cc: agraf@suse.com, borntraeger@de.ibm.com, cohuck@redhat.com,
	christoffer.dall@linaro.org, james.hogan@imgtec.com,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	weidong.huang@huawei.com, arei.gonglei@huawei.com,
	wangxinxin.wang@huawei.com, longpeng.mike@gmail.com
Subject: Re: [RFC] KVM: optimize the kvm_vcpu_on_spin
Date: Mon, 31 Jul 2017 16:23:55 +0200	[thread overview]
Message-ID: <a7a5e723-700a-db6f-afd4-1be8e7e9999c@redhat.com> (raw)
In-Reply-To: <85acc922-2b76-3e52-1f77-c200949b0532@arm.com>

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

      reply	other threads:[~2017-07-31 14:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29  6:22 Longpeng(Mike)
2017-07-31 11:31 ` David Hildenbrand
2017-07-31 12:08   ` Longpeng (Mike)
2017-07-31 12:27     ` David Hildenbrand
2017-07-31 13:20       ` Paolo Bonzini
2017-08-01  3:26         ` Longpeng (Mike)
2017-08-01  8:32           ` Paolo Bonzini
2017-07-31 12:31     ` Cornelia Huck
2017-07-31 13:01       ` Longpeng (Mike)
2017-07-31 13:22 ` Christoffer Dall
2017-07-31 17:32   ` David Hildenbrand
2017-08-01  6:51     ` Cornelia Huck
2017-08-01  2:24   ` Longpeng (Mike)
2017-07-31 13:42 ` Marc Zyngier
2017-07-31 14:23   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7a5e723-700a-db6f-afd4-1be8e7e9999c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.com \
    --cc=arei.gonglei@huawei.com \
    --cc=borntraeger@de.ibm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=cohuck@redhat.com \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longpeng.mike@gmail.com \
    --cc=longpeng2@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=rkrcmar@redhat.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®