Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470152 > unrolled thread

Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter()

Started byChristoffer Dall <christoffer.dall@linaro.org>
First post2016-08-25 15:40 +0200
Last post2016-08-29 20:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter() Christoffer Dall <christoffer.dall@linaro.org> - 2016-08-25 15:40 +0200
    Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter() Shanker Donthineni <shankerd@codeaurora.org> - 2016-08-29 17:30 +0200
      Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter() Christoffer Dall <christoffer.dall@linaro.org> - 2016-08-29 20:20 +0200

#1470152 — Re: [PATCH] arm64: KVM: Save two instructions in __guest_enter()

FromChristoffer Dall <christoffer.dall@linaro.org>
Date2016-08-25 15:40 +0200
SubjectRe: [PATCH] arm64: KVM: Save two instructions in __guest_enter()
Message-ID<sa32W-1xi-15@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1471920

FromShanker Donthineni <shankerd@codeaurora.org>
Date2016-08-29 17:30 +0200
Message-ID<sbwFA-yc-15@gated-at.bofh.it>
In reply to#1470152
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.

[toc] | [prev] | [next] | [standalone]


#1472039

FromChristoffer Dall <christoffer.dall@linaro.org>
Date2016-08-29 20:20 +0200
Message-ID<sbzk5-2el-13@gated-at.bofh.it>
In reply to#1471920
On Mon, Aug 29, 2016 at 10:22:06AM -0500, Shanker Donthineni wrote:
> 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.

I'm not so convinced about saving CPU cycles, but now when I've reviewed
your patch I think it has potential to slightly improve the code.  See
my review of your patch.

-Christoffer

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web