From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423019AbbD2MCf (ORCPT ); Wed, 29 Apr 2015 08:02:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422875AbbD2MCd (ORCPT ); Wed, 29 Apr 2015 08:02:33 -0400 Message-ID: <5540C84D.1050706@redhat.com> Date: Wed, 29 Apr 2015 08:02:21 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org CC: fweisbec@gmail.com, paulmck@linux.vnet.ibm.com Subject: Re: [PATCH] context_tracking: avoid extra checks on guest_enter and guest_exit References: <1430299267-4740-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1430299267-4740-1-git-send-email-pbonzini@redhat.com> 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 04/29/2015 05:21 AM, 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%. > > Cc: Frederic Weisbecker > Cc: Rik van Riel > Cc: Paul McKenney > Signed-off-by: Paolo Bonzini Reviewed-by: Rik van Riel Tested-by: Rik van Riel ... now time to figure out the same thing for user_enter and/or user_exit, lets see which of those we can call with irqs already disabled :) -- All rights reversed