From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>,
Xin Tong <trent.tong@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] outlined TLB lookup on x86
Date: Wed, 22 Jan 2014 09:32:26 -0800 [thread overview]
Message-ID: <52E000AA.7020606@twiddle.net> (raw)
In-Reply-To: <CAFEAcA8uJjtdJJsS3O9EVRTxPEipRVfB3zWoLHrWSVe7Z5UhwQ@mail.gmail.com>
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~
next prev parent reply other threads:[~2014-01-22 17:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 7:41 [Qemu-devel] outlined TLB lookup on x86 Xin Tong
2013-11-27 13:12 ` Lluís Vilanova
2013-11-28 1:58 ` Xin Tong
2013-11-28 16:12 ` Lluís Vilanova
2013-12-08 10:54 ` Xin Tong
2013-12-17 13:52 ` Xin Tong
2013-12-18 2:22 ` Xin Tong
2014-01-21 14:22 ` Xin Tong
2014-01-21 14:28 ` Peter Maydell
2013-12-09 12:18 ` Xin Tong
2013-12-09 15:31 ` Lluís Vilanova
2013-11-28 2:12 ` Richard Henderson
2013-11-28 3:56 ` Xin Tong
2013-12-08 11:19 ` Avi Kivity
2014-01-22 15:28 ` Xin Tong
2014-01-22 16:34 ` Richard Henderson
2014-01-22 16:55 ` Peter Maydell
2014-01-22 17:32 ` Richard Henderson [this message]
2014-01-22 17:35 ` Peter Maydell
2014-01-22 17:45 ` Richard Henderson
2014-01-22 17:56 ` Xin Tong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E000AA.7020606@twiddle.net \
--to=rth@twiddle.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=trent.tong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.