qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] outlined TLB lookup on x86


From: Richard Henderson
Subject: Re: [Qemu-devel] outlined TLB lookup on x86
Date: Wed, 22 Jan 2014 09:32:26 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/22/2014 08:55 AM, Peter Maydell wrote:
> Has anybody ever looked at implementing proper TLB contexts?

I've thought about it.  The best I could come up with is a pointer within ENV
that points to the current TLB context.  It definitely adds another load insn
on the fast path, but we should be able to schedule that first, since it
depends on nothing but the mem_index constant.  Depending on the schedule, it
may require reserving another register on the fast path, which could be a
problem for i686.

It would also greatly expand the size of ENV.

E.g. Alpha would need to implement 256 contexts to match the hardware.  We
currently get away with pretending to implement contexts by implementing none
at all, and flushing the TLB at every context change.

Our current TLB size is 8k.  Times 256 contexts is 2MB.  Which might just be
within the range of possibility.  Certainly not if we expand the size of the
individual TLBs.

Although interestingly, for Alpha we don't need 256 * NB_MMU_MODES, because
MMU_KERNEL_IDX always uses context 0, the "global context".

I don't recall enough about the intimate details of other TLB hardware to know
if there are similar savings that can be had elsewhere.  But the amount of
memory involved is large enough to suggest that some sort of target-specific
sizing of the number of contexts might be required.


r~



reply via email to

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