From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org, gleb@kernel.org, jfrei@linux.vnet.ibm.com,
cornelia.huck@de.ibm.com
Subject: Re: [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding
Date: Wed, 03 Dec 2014 14:06:39 +0100 [thread overview]
Message-ID: <547F0ADF.8050803@redhat.com> (raw)
In-Reply-To: <547F098B.4030003@de.ibm.com>
On 03/12/2014 14:00, Christian Borntraeger wrote:
> Am 03.12.2014 um 13:54 schrieb Paolo Bonzini:
>>
>>
>> On 03/12/2014 13:12, David Hildenbrand wrote:
>>>> This series improves yielding on architectures that cannot disable preemption
>>>> while entering the guest and makes the creating thread of a VCPU the owning
>>>> thread and therefore the yield target when yielding to that VCPU.
>>>>
>>>> We should focus on the case creating thread == executing thread and therefore
>>>> remove the complicated handling of PIDs involving synchronize_rcus.
>>>>
>>>> This way we can speed up the creation of VCPUs and directly yield to the
>>>> executing vcpu threads.
>>>>
>>>> Please note that - in theory - all VCPU ioctls should be triggered from the same
>>>> VCPU thread, so changing threads is not a scenario we should optimize.
>>>>
>>>>
>>>> David Hildenbrand (2):
>>>> KVM: don't check for PF_VCPU when yielding
>>>> KVM: thread creating a vcpu is the owner of that vcpu
>>>>
>>>> include/linux/kvm_host.h | 1 +
>>>> virt/kvm/kvm_main.c | 22 ++--------------------
>>>> 2 files changed, 3 insertions(+), 20 deletions(-)
>>>>
>>>
>>> Hi Paolo,
>>>
>>> would be good if you could have a look at these patches.
>>
>> Sure.
>>
>> I think patch 1 is fine and I am applying it. For patch 2, what about
>> moving the ->pid assignment in the KVM_RUN case of kvm_vcpu_ioctl?
>
> That was my initial patch for the rcu specific latencies (do you
> remember?) But IMHO patch 2 is actually the proper thing to do, no?
Was it? :) Found it:
http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/125694
I don't know... I think it's feasible to have a userspace that creates
all VCPUs in the main thread, and then runs them from multiple threads.
Sure, those people would not have read the docs carefully, but it has
worked until now.
Wrongly-directed yields are a much better reason to apply your patch
than QEMU slowness, and I've done that now.
Paolo
prev parent reply other threads:[~2014-12-03 13:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 16:04 [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding David Hildenbrand
2014-11-25 16:04 ` [PATCH RFC 1/2] KVM: don't check for PF_VCPU when yielding David Hildenbrand
2014-11-26 7:51 ` Christian Borntraeger
2014-11-26 9:23 ` David Hildenbrand
2014-11-26 9:31 ` Christian Borntraeger
2014-11-28 10:08 ` Raghavendra KT
2014-11-28 10:58 ` Christian Borntraeger
2014-11-28 11:40 ` Raghavendra K T
2014-12-01 9:54 ` David Hildenbrand
2014-12-03 12:53 ` Paolo Bonzini
2014-12-03 13:02 ` Paolo Bonzini
2014-12-03 13:04 ` David Hildenbrand
2014-11-25 16:04 ` [PATCH RFC 2/2] KVM: thread creating a vcpu is the owner of that vcpu David Hildenbrand
2014-11-26 7:54 ` Christian Borntraeger
2014-12-03 12:53 ` Paolo Bonzini
2014-12-03 12:12 ` [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding David Hildenbrand
2014-12-03 12:54 ` Paolo Bonzini
2014-12-03 13:00 ` David Hildenbrand
2014-12-03 13:00 ` Christian Borntraeger
2014-12-03 13:06 ` 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=547F0ADF.8050803@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=gleb@kernel.org \
--cc=jfrei@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.