Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679739

Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay
Date 2017-07-03 10:10 +0200
Message-ID <tZ4AH-6PE-33@gated-at.bofh.it> (permalink)
References <tXKXo-1AK-19@gated-at.bofh.it> <tXKXo-1AK-21@gated-at.bofh.it> <tYC1I-2Ms-5@gated-at.bofh.it> <tYCl3-2SW-9@gated-at.bofh.it> <tZ47E-6mA-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2017-07-03 15:30 GMT+08:00 Paolo Bonzini <pbonzini@redhat.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.

"if (r)" makes codes more understandable, in addition, calling expired
the pending timer here looks weird though ktimer->pending.

Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-29 19:00 +0200
  Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-07-02 03:40 +0200
    Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-07-02 04:00 +0200
      Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-07-03 09:40 +0200
        Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-07-03 10:10 +0200
          Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-07-03 10:20 +0200
            Re: [PATCH 3/3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-07-03 10:50 +0200

csiph-web