public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Sean Christopherson" <sean.j.christopherson@intel.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, Wanpeng Li <kernellwp@gmail.com>
Subject: Re: [PATCH] KVM: lapic: Reuse auto-adjusted timer advance of first stable vCPU
Date: Mon, 20 May 2019 15:03:10 +0200	[thread overview]
Message-ID: <3ea5ae51-89b2-ee0c-d156-88198af90b95@redhat.com> (raw)
In-Reply-To: <20190508214702.25317-1-sean.j.christopherson@intel.com>

On 08/05/19 23:47, Sean Christopherson wrote:
> +
> +		/*
> +		 * The first vCPU to get a stable advancement time "wins" and
> +		 * sets the advancement time that is used for *new* vCPUS that
> +		 * are created with auto-adjusting enabled.
> +		 */
> +		if (apic->lapic_timer.timer_advance_adjust_done)
> +			(void)cmpxchg(&adjusted_timer_advance_ns, -1,
> +				      timer_advance_ns);

This is relatively expensive, so it should only be done after setting
timer_advance_adjust_done to true.

Paolo

  reply	other threads:[~2019-05-20 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 21:47 [PATCH] KVM: lapic: Reuse auto-adjusted timer advance of first stable vCPU Sean Christopherson
2019-05-20 13:03 ` Paolo Bonzini [this message]
2019-05-24 20:23   ` Sean Christopherson
2019-05-24 20:48     ` 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=3ea5ae51-89b2-ee0c-d156-88198af90b95@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.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