From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>, KVM <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
"Jens Freimann" <jfrei@linux.vnet.ibm.com>,
"David Hildenbrand" <dahi@linux.vnet.ibm.com>,
"Wanpeng Li" <kernellwp@gmail.com>,
"David Matlack" <dmatlack@google.com>
Subject: Re: [PATCH 1/1] KVM: halt_polling: provide a way to qualify wakeups during poll
Date: Fri, 13 May 2016 12:18:44 +0200 [thread overview]
Message-ID: <5735AA04.2080400@de.ibm.com> (raw)
In-Reply-To: <20160504100545.090be51b.cornelia.huck@de.ibm.com>
On 05/04/2016 10:05 AM, Cornelia Huck wrote:
> On Wed, 4 May 2016 09:50:57 +0200
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>
>> The feedback about the logic triggered some more experiments on my side.
>> So I was experimenting with some different workloads/heuristics and it
>> seems that even more aggressive shrinking (basically resetting to 0 as soon
>> as an invalid poll comes along) does improve the cpu usage even more.
>
> Do we still keep the shrink instead of resetting to 0 explicitly? (In
> case the default shrink factor was set to != 0.) We'd lose a tuneable,
> but it seems the aggressiveness is warranted.
>
>> (So the new diff looks like)
>> @@ -2034,7 +2036,9 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
>> out:
>> block_ns = ktime_to_ns(cur) - ktime_to_ns(start);
>>
>> - if (halt_poll_ns) {
>> + if (!vcpu_valid_wakeup(vcpu))
>> + shrink_halt_poll_ns(vcpu);
>> + else if (halt_poll_ns) {
>> if (block_ns <= vcpu->halt_poll_ns)
>> ;
>
> ...making this
>
> if (halt_poll_ns && vcpu_valid_wakeup(vcpu)) {
>
I decided to keep my version as it should be functionally equivalent for shrink==0
but it allows the performance folks to do future testing for better heuristics.
David, Wanpeng,
I just send out the patch set but I forgot to Cc you :-/
Christian
prev parent reply other threads:[~2016-05-13 10:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 12:37 [PATCH v2] KVM: halt_polling: provide a way to qualify wakeups during poll Christian Borntraeger
2016-05-03 12:37 ` [PATCH 1/1] " Christian Borntraeger
2016-05-03 12:41 ` David Hildenbrand
2016-05-03 12:56 ` Cornelia Huck
2016-05-03 15:03 ` Radim Krčmář
2016-05-03 18:12 ` Christian Borntraeger
2016-05-04 6:22 ` Cornelia Huck
2016-05-03 15:09 ` Radim Krčmář
2016-05-04 7:50 ` Christian Borntraeger
2016-05-04 8:05 ` Cornelia Huck
2016-05-13 10:18 ` Christian Borntraeger [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=5735AA04.2080400@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=dmatlack@google.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox