From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757765AbcH2PWL (ORCPT ); Mon, 29 Aug 2016 11:22:11 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42042 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757517AbcH2PWK (ORCPT ); Mon, 29 Aug 2016 11:22:10 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org CBB8561361 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=shankerd@codeaurora.org Reply-To: shankerd@codeaurora.org Subject: Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter() References: <1470791736-13949-1-git-send-email-shankerd@codeaurora.org> <20160825133122.GA8016@lvm> To: Christoffer Dall Cc: Marc Zyngier , linux-kernel , linux-arm-kernel , kvmarm , Paolo Bonzini , Will Deacon , Catalin Marinas , James Morse From: Shanker Donthineni Message-ID: Date: Mon, 29 Aug 2016 10:22:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160825133122.GA8016@lvm> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoffer, This is change may not provide the measurable performance improvement, but still we can save a few cpu cycles on vCPU context switch and also improves the code readability. On 08/25/2016 08:31 AM, Christoffer Dall wrote: > Hi Shanker, > > On Tue, Aug 09, 2016 at 08:15:36PM -0500, Shanker Donthineni wrote: >> We are doing an unnecessary stack push/pop operation when restoring >> the guest registers x0-x18 in __guest_enter(). This patch saves the >> two instructions by using x18 as a base register. No need to store >> the vcpu context pointer in stack because it is redundant and not >> being used anywhere, the same information is available in tpidr_el2. > Does this have any measureable benefit? > > Thanks, > -Christoffer -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.