On Mon, 29 May 2023, Richard Henderson wrote:
On 5/29/23 17:05, BALATON Zoltan wrote:
The tlb index and entry are often retrieved together and tlb_entry()
already calls tlb_index() so it could easily return it. Add a
tlb_index_and_entry() function that does that to simplify callers and
maybe avoid some duplicate calculations.
Signed-off-by: BALATON Zoltan <[email protected]>
The compiler does a good job removing duplicate calculations already.
What effect do you see with this?
Hard to tell because measurements always change slightly when I run some
benchmark in guest so if it has an effect it's not big but I find it more
readable with a single call than two calls so that's the main motivation
here.
Regards,
BALATON Zoltan