public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: xu feng <xu_feng_xu@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: virtual cache, TLB, and OS
Date: Sat, 09 Dec 2006 21:15:22 -0800	[thread overview]
Message-ID: <457B97EA.3080609@goop.org> (raw)
In-Reply-To: <20061210022951.440.qmail@web58306.mail.re3.yahoo.com>

xu feng wrote:
> I am just confused about the author:
> 1- first point, why the cache has to be bothered by
> the change in the address logical-physical mapping
> since it is a virtual cache??
>   

If you:

   1. mmap file A at virtual address X
   2. use memory at X
   3. mmap file B at X
   4. look at X

If its a virtual cache, and it wasn't flushed at step 3, then step 4
will see A's contents rather than B's.

> 2- could you please give me a situation where two
> virtual addresses from the same process are mapped to
> the same physical address? 
>
> i can't see this happening since each process page is
> allocated a dedicated frame. 
>   

If you mmap a file multiple times, then the kernel will assign multiple
different virtual addresses for the same page cache page(s).


    J

      reply	other threads:[~2006-12-10  5:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10  2:29 virtual cache, TLB, and OS xu feng
2006-12-10  5:15 ` Jeremy Fitzhardinge [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=457B97EA.3080609@goop.org \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xu_feng_xu@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox