All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John Newlin" <jnewlin@tsoft.com>
To: <linux-kernel@vger.kernel.org>
Subject: Cache aliasing
Date: Mon, 24 Feb 2003 23:24:11 -0800	[thread overview]
Message-ID: <006a01c2dc9e$e4f685a0$0b01a8c0@john1> (raw)

I'm working on a port of Linux to a processor that has virutally
indexed caches that are larger than the page size.  This brings up
the documented feature of cache aliasing.

As I am looking over how other ports (sh-4, sparc64 etc) have solved
the problem, it made me wonder if this is the best way to solve
the problem.

Would it make more sense to just always ensure that your 
virtual and physical pages had matching "color" bits?

For example, in the memory allocator, you would have to pass in
the vaddr that you wanted to map to physical space, and then the
memory allocator would find a physical page of the correct color.

And in the case where you are mirroring a user page into kernel
space, you would have to choose a virtual address of the correct
colour.  On architectures like x86 where cache aliasing is never
a concern, this code could be optimized away.


The benefits would be, any architecture that has cache aliasing
wouldn't have to go through hoops to keep memory coherent, and
depending on how often memory is flushed in the caches it might
give some performance boost.



-John 

             reply	other threads:[~2003-02-25  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-25  7:24 John Newlin [this message]
2003-02-26  3:59 ` Cache aliasing David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2006-03-16 20:38 Cache Aliasing Chris Zankel
2006-03-16 22:39 ` David S. Miller

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='006a01c2dc9e$e4f685a0$0b01a8c0@john1' \
    --to=jnewlin@tsoft.com \
    --cc=linux-kernel@vger.kernel.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 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.