From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.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 09:30:19 +0200 [thread overview]
Message-ID: <20be1e98-deec-ea00-32e1-251781a35f83@redhat.com> (raw)
In-Reply-To: <CANRm+CyaunKda=pYKn5ZV_Mo4RzwTePWJ-Y0yJLptTMy0Mn+1Q@mail.gmail.com>
On 02/07/2017 03:56, Wanpeng Li wrote:
>>> - if (!apic_lvtt_period(apic) && atomic_read(&ktimer->pending))
>>> + if (!apic_lvtt_period(apic) && (r || atomic_read(&ktimer->pending))) {
>>> + if (r)
>>> + apic_timer_expired(apic);
>>> return false;
>>> + }
>>
>> This logic is not the same as in my v4
>> http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1434040.html
>> . You return false for the expired timer and actually it will switch
>> to sw timer.
>
> Ah, I miss read it, the rebase is correct.
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.
Paolo
next prev parent reply other threads:[~2017-07-03 7:30 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 [this message]
2017-07-03 8:08 ` Wanpeng Li
2017-07-03 8:16 ` Paolo Bonzini
2017-07-03 8:41 ` Wanpeng Li
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=20be1e98-deec-ea00-32e1-251781a35f83@redhat.com \
--to=pbonzini@redhat.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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).