From: Christian Borntraeger <borntraeger@de.ibm.com>
To: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, KVM <kvm@vger.kernel.org>,
Gleb Natapov <gleb@kernel.org>, Rik van Riel <riel@redhat.com>,
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
Michael Mueller <mimu@linux.vnet.ibm.com>
Subject: Re: [PATCH/RFC] KVM: track pid for VCPU only on KVM_RUN ioctl
Date: Tue, 19 Aug 2014 16:46:25 +0200 [thread overview]
Message-ID: <53F36341.9030702@de.ibm.com> (raw)
In-Reply-To: <20140819162306.3750c1b1@thinkpad-w530>
On 19/08/14 16:23, David Hildenbrand wrote:
>> On 19/08/14 14:14, David Hildenbrand wrote:
>>>> Il 19/08/2014 13:28, David Hildenbrand ha scritto:
>>>>> Looking at the code, kvm_cpu_synchronize_state() seems to do these ioctls in
>>>>> the vcpu thread (e.g. comming from cpu_synchronize_all_states()), any reasons
>>>>> why kvm_cpu_synchronize_post_reset() doesn't do the same (e.g. called from
>>>>> cpu_synchronize_all_post_reset())?
>>>>
>>>> No reason, feel free to post a patch for QEMU kvm-all.c.
>>>> Documentation/virtual/kvm/api.txt clearly says:
>>>>
>>>> Only run vcpu ioctls from the same thread that was used to create the
>>>> vcpu.
>>>>
>>>> Paolo
>>>>
>>>
>>> Thanks! A little more tweaking in the other parts of s390x resets
>>> and we should be able to reduce the number of "wrong" ioctls (I think I found
>>> most cases that are responsible for the performance degradation).
>>
>> Hmm. We want to not only reduce, we want them be zero.
>> In addition to a reworked MP_STATE patch set, we might be able to change the code to call "KVM_S390_INITIAL_RESET" only from the cpu thread itself.
>> If that simplifies things, we could avoid doing KVM_S390_INITIAL_RESET on CPU creation, because we know that all kernel version will do an implicit cpu reset on cpu creation anyway. Can you have a try on this as well when reworking that code? We could then fix this rcu performance penalty independent from getting rid of that ioctl.
>>
>> Christian
>>
>
> Already working on it, only one ioctl left on vcpu creation that is called
> from wrong context, trying to hide from me. Restarts and resets are already
Maybe its the synchronize when the oldpid is 0? Can you check the patch that I just sent?
> blasting fast.
>
> David
>
next prev parent reply other threads:[~2014-08-19 14:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 14:44 [PATCH/RFC] KVM: track pid for VCPU only on KVM_RUN ioctl Christian Borntraeger
2014-08-07 8:21 ` Raghavendra K T
2014-08-07 9:59 ` Christian Borntraeger
2014-08-07 13:40 ` Paolo Bonzini
2014-08-19 8:38 ` Christian Borntraeger
2014-08-07 13:39 ` Paolo Bonzini
2014-08-19 8:38 ` Christian Borntraeger
2014-08-19 9:27 ` Paolo Bonzini
2014-08-19 9:47 ` Christian Borntraeger
2014-08-19 9:53 ` Paolo Bonzini
2014-08-19 9:59 ` Christian Borntraeger
2014-08-19 10:03 ` Paolo Bonzini
2014-08-19 10:09 ` Christian Borntraeger
2014-08-19 10:31 ` Paolo Bonzini
2014-08-19 10:48 ` Christian Borntraeger
2014-08-19 10:50 ` Paolo Bonzini
2014-08-19 11:28 ` David Hildenbrand
2014-08-19 12:06 ` Paolo Bonzini
2014-08-19 12:14 ` David Hildenbrand
2014-08-19 14:10 ` Christian Borntraeger
2014-08-19 14:23 ` David Hildenbrand
2014-08-19 14:46 ` Christian Borntraeger [this message]
2014-08-19 14:52 ` David Hildenbrand
2014-08-18 5:02 ` Wanpeng Li
2014-08-19 14:04 ` Christian Borntraeger
2014-08-19 23:22 ` Wanpeng Li
2014-08-20 7:01 ` Christian Borntraeger
2014-12-03 13:20 ` Paolo Bonzini
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=53F36341.9030702@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mimu@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=raghavendra.kt@linux.vnet.ibm.com \
--cc=riel@redhat.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 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.