All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kvm <kvm@vger.kernel.org>, Radim Krcmar <rkrcmar@redhat.com>,
	Wanpeng Li <wanpeng.li@hotmail.com>
Subject: Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay
Date: Mon, 3 Jul 2017 16:41:48 +0800	[thread overview]
Message-ID: <CANRm+CxmyhcxPZRLOt9aTf=mT6wCiq9sJ16Ani0P4bizzEMscw@mail.gmail.com> (raw)
In-Reply-To: <c0cda5bf-eed1-9898-925d-ad99407cba09@redhat.com>

2017-07-03 16:16 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>
>
> On 03/07/2017 10:08, Wanpeng Li wrote:
>>> Yeah, I'm not entirely satisfied with it but it's working: start_sw
>>> timer will see ktimer->pending and do nothing.
>>>
>>> But thinking more about it, maybe the "if (r)" can be omitted
>>> completely?  We need to benchmark it but it can be done.
>> "if (r)" makes codes more understandable, in addition, calling expired
>> the pending timer here looks weird though ktimer->pending.
>
> We can remove the call to apic_timer_expired too (sorry if I was too
> terse). :)  start_sw_period and start_sw_tscdeadline would take care of it.

IRQ disable and ktime_get() in start_sw_tscdeadline() are more
expensive. So maybe current status is a better choice. :)

Regards,
Wanpeng Li

  reply	other threads:[~2017-07-03  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 16:58 [PATCH 0/3] KVM: lapic: optimize injection of already-expired timer Paolo Bonzini
2017-06-29 16:58 ` [PATCH 1/3] KVM: lapic: reorganize start_hv_timer Paolo Bonzini
2017-06-29 16:58 ` [PATCH 2/3] KVM: lapic: reorganize restart_apic_timer Paolo Bonzini
2017-06-29 16:58 ` [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini
2017-07-02  1:35   ` Wanpeng Li
2017-07-02  1:56     ` Wanpeng Li
2017-07-03  7:30       ` Paolo Bonzini
2017-07-03  8:08         ` Wanpeng Li
2017-07-03  8:16           ` Paolo Bonzini
2017-07-03  8:41             ` Wanpeng Li [this message]
2017-06-30  1:30 ` [PATCH 0/3] KVM: lapic: optimize injection of already-expired timer Wanpeng Li

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='CANRm+CxmyhcxPZRLOt9aTf=mT6wCiq9sJ16Ani0P4bizzEMscw@mail.gmail.com' \
    --to=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.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.