From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, KVM <kvm@vger.kernel.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
David Hildenbrand <dahi@linux.vnet.ibm.com>
Subject: Re: [PATCH/RFC] KVM: halt_polling: provide a way to qualify wakeups during poll
Date: Tue, 3 May 2016 10:55:25 +0200 [thread overview]
Message-ID: <5728677D.206@de.ibm.com> (raw)
In-Reply-To: <20160502152517.GB30059@potion>
On 05/02/2016 05:25 PM, Radim Krčmář wrote:
[...]
>> I have some pathological cases where I can easily get all CPUs to poll all
>> the time without the shrinking part of the patch. (e.g. guest with 16 CPUs,
>> 8 null block devices and 64 dd reading small blocks with O_DIRECT from these disks)
>> which cause permanent exits which consumes all 16 host CPUs. Limiting the grow
>> did not seem to be enough in my testing, but when I also made shrinking more
>> aggressive things improved.
>
> So the problem is that a large number of VCPUs and devices will often
> have a floating irq and the polling always succeeds unless halt_poll_ns
> is very small. Poll window doesn't change if the poll succeds,
> therefore we need a very agressive shrinker in order to avoid polling?
Yes, thats what I concluded after experimenting.
>
>> But I am certainly open for other ideas how to tune this.
>
> I don't see good improvements ... the problem seems to lie elsewhere:
> Couldn't we exclude floating irqs from kvm_vcpu_check_block()?
>
> (A VCPU running for other reasons could still handle a floating irq and
> we always kick one VCPU, so VM won't starve and other VCPUs won't be
> prevented from sleeping.)
I thought about that in my first experiments, but we really have to leave
vcpu_block for all cases otherwise we might add huge latencies or even
starve the delivery. For example the other CPUs can block specific
interruption subclass via the control register 6.
>>> It would make more sense to me, because we are not interested in latency
>>> of invalid wakeups, so they shouldn't affect valid ones.
>>>
>>>> } else
>>>> vcpu->halt_poll_ns = 0;
>>>> + vcpu_reset_wakeup(vcpu);
>>>>
>>>> trace_kvm_vcpu_wakeup(block_ns, waited);
>>>
>>> (Tracing valid/invalid wakeups could be useful.)
>>
>> As an extension of the old trace events?
>
> Yes.
>
next prev parent reply other threads:[~2016-05-03 8:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 10:42 [PATCH/RFC] KVM: halt_polling: provide a way to qualify wakeups during poll Christian Borntraeger
2016-05-02 10:45 ` David Hildenbrand
2016-05-02 11:46 ` Cornelia Huck
2016-05-02 11:50 ` Christian Borntraeger
2016-05-02 13:34 ` Radim Krčmář
2016-05-02 14:30 ` Christian Borntraeger
2016-05-02 15:25 ` Radim Krčmář
2016-05-03 8:55 ` Christian Borntraeger [this message]
2016-05-02 19:44 ` David Matlack
2016-05-03 8:46 ` Christian Borntraeger
2016-05-03 5:42 ` Wanpeng Li
2016-05-03 7:00 ` Christian Borntraeger
2016-05-03 9:19 ` Cornelia Huck
2016-05-10 13:54 ` Paolo Bonzini
2016-05-03 7:50 ` Wanpeng Li
2016-05-03 8:00 ` Cornelia Huck
2016-05-03 8:00 ` Christian Borntraeger
2016-05-03 8:48 ` David Hildenbrand
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=5728677D.206@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=jfrei@linux.vnet.ibm.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