lkml.org 
[lkml]   [2020]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: x86: small optimization for is_mtrr_mask calculation
Date
Wanpeng Li <kernellwp@gmail.com> wrote:
>On Fri, 6 Mar 2020 at 10:23, linmiaohe <linmiaohe@huawei.com> wrote:
>>
>> hpa@zytor.com wrote:
>> >>On March 5, 2020 6:05:40 PM PST, linmiaohe <linmiaohe@huawei.com> wrote:
>> >>Hi,
>> >>Paolo Bonzini <pbonzini@redhat.com> wrote:
>> >>Many thanks for suggestion. What do you mean is like this ?
>> >>
>> >> index = (msr - 0x200) >> 1;
>> >> is_mtrr_mask = msr & 1;
>> >>
>> >>Thanks again.
>> >
>> >You realize that the compiler will probably produce exactly the same code, right? As such, it is about making the code easy for the human reader.
>> >
>> >Even if it didn't, this code is as far from performance critical as one can possibly get.
>>
>> Yep, it looks gain little. Thanks.
>
>Please post the performance number when you mention optimize XXX later.
>

Sure, I would take care of this. Thanks for your reminder!

\
 
 \ /
  Last update: 2020-03-06 03:30    [W:0.031 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site