From: Christian Borntraeger <borntraeger@de.ibm.com>
To: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@kernel.org,
jfrei@linux.vnet.ibm.com, cornelia.huck@de.ibm.com,
raghavendra.kt.linux@gmail.com,
Michael Mueller <mimu@linux.vnet.ibm.com>
Subject: Re: [PATCH RFC 1/2] KVM: don't check for PF_VCPU when yielding
Date: Wed, 26 Nov 2014 10:31:51 +0100 [thread overview]
Message-ID: <54759E07.5050204@de.ibm.com> (raw)
In-Reply-To: <20141126102319.2f92c64b@thinkpad-w530>
Am 26.11.2014 um 10:23 schrieb David Hildenbrand:
>> This change is a trade-off.
>> PRO: This patch would improve the case of preemption on s390. This is probably a corner case as most distros have preemption off anyway.
>> CON: The downside is that kvm_vcpu_yield_to is called also from kvm_vcpu_on_spin. Here we want to avoid the scheduler overhead for a wrong decision.
>
> Won't most of that part be covered by:
> if (!ACCESS_ONCE(vcpu->preempted))
Hmm, right. Checking vcpu->preempted and PF_VCPU might boil down to the same.
Would be good if to have to performance regression test, though.
>
> vcpu->preempted is only set when scheduled out involuntarily. It is cleared
> when scheduled in. s390 sets it manually, to speed up waking up a vcpu.
>
> So when our task is scheduled in (an PF_VCPU is set), this check will already
> avoid scheduler overhead in kvm_vcpu_on_spin() or am I missing something?
>
CC Raghavendra KT. Could be rerun your kernbench/sysbench/ebizzy setup on x86 to see if the patch in this thread causes any regression? If think your commit 7bc7ae25b143"kvm: Iterate over only vcpus that are preempted" might have really made the PF_VCPU check unnecessary
CC Michael Mueller, do we still have our yield performance setup handy to check if this patch causes any regression?
Christian
next prev parent reply other threads:[~2014-11-26 9:31 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 [this message]
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
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=54759E07.5050204@de.ibm.com \
--to=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 \
--cc=mimu@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=raghavendra.kt.linux@gmail.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.