From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753184AbcJNLMN (ORCPT ); Fri, 14 Oct 2016 07:12:13 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35767 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbcJNLME (ORCPT ); Fri, 14 Oct 2016 07:12:04 -0400 Subject: Re: [PATCH RFC V3 0/6] KVM: LAPIC: Add APIC Timer periodic/oneshot mode VMX preemption timer support To: Wanpeng Li , "linux-kernel@vger.kernel.org" , kvm References: <1476358458-3525-1-git-send-email-wanpeng.li@hotmail.com> Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Yunhong Jiang , Wanpeng Li From: Paolo Bonzini Message-ID: <9d7fffc9-7e46-fa03-70bf-e803c2d61786@redhat.com> Date: Fri, 14 Oct 2016 13:11:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/10/2016 12:05, Wanpeng Li wrote: > 2016-10-13 19:34 GMT+08:00 Wanpeng Li : > [...] >> >> The patchset reduces ~300+ clock cycles for each APIC timer oneshot mode >> operation virtualization. However, the performance of periodic mode is >> still bad, so this version is still a RFC. Your comments to improve the >> patchset is a great appreciated. > > I observed that the clock cycles between the start of > kvm_lapic_expired_hv_timer() (periodic mode emulated through restart a > preemption timer after the last preemption timer vmexit) to > kvm_inject_apic_timer_irqs() is almost half of the clock cycles > between the start of apic_timer_fn() (periodic mode emulated through > hrtimer) to kvm_inject_apic_timers_irqs(), so the overhead of > preemption timer is lower in this path. Maybe something is still not > correct in other places which results in performance of periodic mode > emulated by VMX preemption timer is still not good. Any help is a > great appreciated. :) > > Radim, Paolo, ping :) Just post the patches and we'll see. :) Another useful thing to do is to prepare testcases similar to tscdeadline_latency, but using the periodic and oneshot modes. Paolo