From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755077AbbJ1FVU (ORCPT ); Wed, 28 Oct 2015 01:21:20 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:33627 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754983AbbJ1FVS (ORCPT ); Wed, 28 Oct 2015 01:21:18 -0400 MIME-Version: 1.0 In-Reply-To: <1445996397-32703-3-git-send-email-pbonzini@redhat.com> References: <1445996397-32703-1-git-send-email-pbonzini@redhat.com> <1445996397-32703-3-git-send-email-pbonzini@redhat.com> From: Andy Lutomirski Date: Tue, 27 Oct 2015 22:20:58 -0700 Message-ID: Subject: Re: [PATCH 2/3] context_tracking: avoid irq_save/irq_restore on guest entry and exit To: Paolo Bonzini Cc: "linux-kernel@vger.kernel.org" , kvm list , Andy Lutomirski , Frederic Weisbecker , Rik van Riel , Paul McKenney Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2015 at 6:39 PM, Paolo Bonzini wrote: > guest_enter and guest_exit must be called with interrupts disabled, > since they take the vtime_seqlock with write_seq{lock,unlock}. > Therefore, it is not necessary to check for exceptions, nor to > save/restore the IRQ state, when context tracking functions are > called by guest_enter and guest_exit. > > Split the body of context_tracking_entry and context_tracking_exit > out to __-prefixed functions, and use them from KVM. > > Rik van Riel has measured this to speed up a tight vmentry/vmexit > loop by about 2%. Looks generally sensible. I'm not familiar enough with the code to call it reviewed-by while sitting on the airport shuttle. --Andy