qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] TLB addend field


From: Paolo Bonzini
Subject: Re: [Qemu-devel] TLB addend field
Date: Wed, 21 Jun 2017 16:46:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 21/06/2017 16:15, Theodore Dubois wrote:
> Hi, I’ve got a question about the addend field in the TLB. Why use
> this instead of a pointer to the host page? I would think the speed
> difference would be unmeasurable.

After the TLB check you have computed "x & ~(PAGE_SIZE - 1)", but not "x
& (PAGE_SIZE - 1)".  Without the addend field you would need an extra
instruction for the latter and you would have more complicated register
allocations.  It would probably be small but measurable.  If you think
it simplifies the code and it is not measurable, do it and send a patch! :)

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]