From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753021AbdF2Q66 (ORCPT ); Thu, 29 Jun 2017 12:58:58 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35953 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753319AbdF2Q6f (ORCPT ); Thu, 29 Jun 2017 12:58:35 -0400 From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: rkrcmar@redhat.com, wanpeng.li@hotmail.com Subject: [PATCH 0/3] KVM: lapic: optimize injection of already-expired timer Date: Thu, 29 Jun 2017 18:58:18 +0200 Message-Id: <1498755501-39602-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is my take on Wanpeng's optimization, whose effect I've now measured with vmexit.flat. Indeed, without patch 3 the new tscdeadline_immed benchmark is 50% slower with preemption_timer=1 than with preemption_timer=0. Patch 1 refactors start_hv_timer to prepare for the next one and to simplify Wanpeng's patch (a lot). Patch 2 avoids a bug that I didn't catch in my earlier review: kvm_x86_ops->set_timer must not be called directly when the TSC goes backwards. Paolo Paolo Bonzini (2): KVM: lapic: reorganize start_hv_timer KVM: lapic: reorganize restart_apic_timer Wanpeng Li (1): KVM: LAPIC: Fix lapic timer injection delay arch/x86/kvm/lapic.c | 116 ++++++++++++++++++++++++++++----------------------- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/vmx.c | 3 +- arch/x86/kvm/x86.c | 8 ++-- 4 files changed, 71 insertions(+), 58 deletions(-) -- 1.8.3.1