From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>, kvm <kvm@vger.kernel.org>,
"Liran Alon" <liran.alon@oracle.com>,
"Wanpeng Li" <wanpengli@tencent.com>
Subject: Re: [PATCH v4 0/4] KVM: lapic: Fix a variety of timer adv issues
Date: Tue, 30 Apr 2019 12:31:02 -0700 [thread overview]
Message-ID: <20190430193102.GA4523@linux.intel.com> (raw)
In-Reply-To: <CANRm+CxcmjzV_6q-nf59dZ+4nbifM389kqQy514XFDQSKjxZvg@mail.gmail.com>
On Sun, Apr 28, 2019 at 08:54:30AM +0800, Wanpeng Li wrote:
> Hi Sean,
> On Thu, 18 Apr 2019 at 01:18, Sean Christopherson
> <sean.j.christopherson@intel.com> wrote:
> >
> > KVM's recently introduced adaptive tuning of lapic_timer_advance_ns has
> > several critical flaws:
> [.../...]
> >
> > - TSC scaling is done on a per-vCPU basis, while the advancement value
> > is global. This issue is also present without adaptive tuning, but
> > is now more pronounced.
>
> Did you test this against overcommit scenario? Your per-vCPU variable
> can be a large number(yeah, below your 5000ns) when neighbour VMs on
> the same host consume cpu heavily, however, kvm will wast a lot of
> time to wait when the neighbour VMs are idle. My original patch
> evaluate the conservative hypervisor overhead when the first VM is
> deployed on the host. It doesn't matter whether or not the VMs on this
> host alter their workload behaviors later. Unless you tune the
> per-vCPU variable always, however, I think it will introduce more
> overhead. So Liran's patch "Consider LAPIC TSC-Deadline Timer expired
> if deadline too short" also can't depend on this.
I didn't test it in overcommit scenarios. I wasn't aware of how the
automatic adjustments were being used in real deployments.
The best option I can think of is to expose a vCPU's advance time to
userspace (not sure what mechanism would be best). This would allow
userspace to run a single vCPU VM with auto-tuning enabled, snapshot
the final adjusted advancment, and then update KVM's parameter to set
an explicit advancement and effectively disable auto-tuning.
next prev parent reply other threads:[~2019-04-30 19:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 17:15 [PATCH v4 0/4] KVM: lapic: Fix a variety of timer adv issues Sean Christopherson
2019-04-17 17:15 ` [PATCH v4 1/4] KVM: lapic: Disable timer advancement if adaptive tuning goes haywire Sean Christopherson
2019-04-17 17:15 ` [PATCH v4 2/4] KVM: lapic: Track lapic timer advance per vCPU Sean Christopherson
2019-04-17 17:15 ` [PATCH v4 3/4] KVM: lapic: Allow user to disable adaptive tuning of timer advancement Sean Christopherson
2019-04-17 17:15 ` [PATCH v4 4/4] KVM: lapic: Convert guest TSC to host time domain if necessary Sean Christopherson
2019-04-28 0:54 ` [PATCH v4 0/4] KVM: lapic: Fix a variety of timer adv issues Wanpeng Li
2019-04-30 19:31 ` Sean Christopherson [this message]
2019-05-05 0:43 ` Wanpeng Li
2019-05-08 21:43 ` Sean Christopherson
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=20190430193102.GA4523@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=wanpengli@tencent.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.