From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Qemu memory management
Date: Thu, 29 Mar 2007 14:59:30 +0100 [thread overview]
Message-ID: <20070329135930.GA6398@miranda.arrow> (raw)
In-Reply-To: <000001c771e8$cff5c3d0$14b2a8c0@michael5ee790a>
On Thu, Mar 29, 2007 at 11:58:33AM +0200, Michael Neubauer wrote:
> "To avoid flushing the translated code each time the MMU mappings change,
> QEMU uses a physically indexed translation cache. It means that each TB is
> indexed with its physical address."
>
> Why does a cache like that prevent the translated code from being flushed?
> If a translated code is relocated in physical memory (e. g. after a paging
> swap operation) that would render the cache useless in my opinion.
My impression is that "each time the MMU mappings change" basically
means "when there's a context switch" and not "when swapping occurs".
If code is swapped out, then yes, it would have to be translated again.
If you wanted to avoid that, you'd need a virtually indexed cache, and I
believe that would require co-operation from the OS, as it would be very
difficult for QEMU to keep track of processes/threads and paging itself.
You'd also have to deal with cache aliases to avoid translating code
for each process or thread that uses it.
--
Stuart Brady
prev parent reply other threads:[~2007-03-29 14:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 9:58 [Qemu-devel] Qemu memory management Michael Neubauer
2007-03-29 13:59 ` Stuart Brady [this message]
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=20070329135930.GA6398@miranda.arrow \
--to=sdbrady@ntlworld.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).