kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH v3 1/4] KVM: LAPIC: Make lapic timer unpinned when timer is injected by pi
Date: Tue, 11 Jun 2019 17:39:22 -0300	[thread overview]
Message-ID: <20190611203919.GB7520@amt.cnet> (raw)
In-Reply-To: <1560255429-7105-2-git-send-email-wanpengli@tencent.com>

On Tue, Jun 11, 2019 at 08:17:06PM +0800, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@tencent.com>
> 
> Make lapic timer unpinned when timer is injected by posted-interrupt,
> the emulated timer can be offload to the housekeeping cpus.
> 
> The host admin should fine tuned, e.g. dedicated instances scenario 
> w/ nohz_full cover the pCPUs which vCPUs resident, several pCPUs 
> surplus for housekeeping, disable mwait/hlt/pause vmexits to occupy 
> the pCPUs, fortunately preemption timer is disabled after mwait is 
> exposed to guest which makes emulated timer offload can be possible. 

Li,

Nice!

I think you can drop the HRTIMER_MODE_ABS_PINNED and
instead have 

void kvm_set_pending_timer(struct kvm_vcpu *vcpu)
{
        kvm_make_request(KVM_REQ_PENDING_TIMER, vcpu);
	kvm_vcpu_kick(vcpu);
}

As an alternative to commit 61abdbe0bcc2b32745ab4479cc550f4c1f518ee2
(as a first patch in your series).

This will make the logic simpler (and timer migration, for
nonhousekeeping case, ensures timer is migrated).

Also, should make this work for non housekeeping case as well.
(But that can be done later).

Thanks.


  reply	other threads:[~2019-06-11 20:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 12:17 [PATCH v3 0/4] KVM: LAPIC: Implement Exitless Timer Wanpeng Li
2019-06-11 12:17 ` [PATCH v3 1/4] KVM: LAPIC: Make lapic timer unpinned when timer is injected by pi Wanpeng Li
2019-06-11 20:39   ` Marcelo Tosatti [this message]
2019-06-12  0:45     ` Wanpeng Li
2019-06-12 16:15       ` Marcelo Tosatti
2019-06-11 12:17 ` [PATCH v3 2/4] KVM: LAPIC: lapic timer interrupt is injected by posted interrupt Wanpeng Li
2019-06-11 20:18   ` Marcelo Tosatti
2019-06-12  1:48     ` Wanpeng Li
2019-06-12 15:22       ` Radim Krčmář
2019-06-12 21:51         ` Marcelo Tosatti
2019-06-11 12:17 ` [PATCH v3 3/4] KVM: LAPIC: Ignore timer migration when lapic timer is injected by posted-interrupt Wanpeng Li
2019-06-11 12:17 ` [PATCH v3 4/4] KVM: LAPIC: add advance timer support to pi_inject_timer Wanpeng Li
2019-06-13  7:59 ` [PATCH v3 0/4] KVM: LAPIC: Implement Exitless Timer Maxim Levitsky
2019-06-13  8:25   ` Wanpeng Li
2019-06-13  9:49     ` Maxim Levitsky

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=20190611203919.GB7520@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).