Subject: Re: How does bsd deal with architectures that have cache aliasing?
To: Andrew Brown <atatat@atatdot.net>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-misc
Date: 02/28/2003 10:28:44
On Fri, Feb 28, 2003 at 01:26:27PM -0500, Andrew Brown wrote:

 > >If someone wouldn't mind pointing at the relevant pieces of the
 > >kernel that deals with cache aliasing for hardware that has
 > >this "feature" I would appreciate it.  I just wanted to get
 > >the gist of how the BSD kernel deals with this issue.
 > 
 > if i understand your question, the answer is probably: look through
 > the kernel source for PMAP_PREFER().  that's the machine-dependent
 > hook into vm that attempts to align mappings for optimal cache effect.

There's another piece, too.  The pmap module is responsible for e.g.
un-cache'ing mappings or revoking mappings when incompatible aliases
*do* occur.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>