Re: [PATCH v2 7/9] KVM: MMU: Optimize is_last_gpte()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/19/2012 08:17 PM, Avi Kivity wrote:
> On 09/18/2012 10:36 AM, Xiao Guangrong wrote:
>> On 09/16/2012 08:07 PM, Avi Kivity wrote:
>>> Instead of branchy code depending on level, gpte.ps, and mmu configuration,
>>> prepare everything in a bitmap during mode changes and look it up during
>>> runtime.
>>> 
>> 
>> Avi,
>> 
>> Can we introduce ignore_bits_mask[] (like rsvd_bits_mask), if pse is not supported,
>> we can set PTE_PSE in this ignore_bits_mask, then the function can be simplified to
>> 
>> 	return (level == 1) || gpte & ~vcpu->ignore_bits_mask[level] & PTE_PSE
>> 
>> I think it is more readable.
> 
> It's more readable, yes, but those loads do show up in profiles.  So I'd
> like to avoid them unless they save a lot of code.

Oops, this is replacing one load by another.  Still, the new code is
more branchy.


-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux