linux-mips
[Top] [All Lists]

Re: Tips on inspecting / debuging cache

To: Wayne Gowcher <wgowcher@yahoo.com>
Subject: Re: Tips on inspecting / debuging cache
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 14 Mar 2003 20:26:09 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20030314021308.60082.qmail@web11905.mail.yahoo.com>; from wgowcher@yahoo.com on Thu, Mar 13, 2003 at 06:13:08PM -0800
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030314021308.60082.qmail@web11905.mail.yahoo.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Thu, Mar 13, 2003 at 06:13:08PM -0800, Wayne Gowcher wrote:

> I am wondering if someone could point me towards
> articles / source code that would give me a little
> insight into how to debug cache problems in mips.
> 
> For example , how do I inspect the contents of the
> cache ? Are there routines to dump out the contents of
> the cache ?

Frankly, such code isn't to useful.  The problems in the cache code can
be fairly subtle.  The only thing that has worked halfway well is reading
the code 1,000 times more after having read it 1,000 times.  And because
it's such a nice job, read it another 1000 times when finished.

If you're refering to the current round of cache problems introduced about
three days ago when I eleminated flush_page_to_ram() and replace it
with flush_dcache_page() - the untested quickfix is changing the
definitions of clear_user_page() and copy_user_page() in <asm/page.h> to
flush the data cache after the operation, for example by invoking
flush_cache_all().  This particular problem affects all processors with
virtually indexed data caches except the R4000 and R4000 SC and MC
versions and the R10000 family.

And everybody's favorite question, was this necessary that late in 2.4?
Yes, it was.  The new mechanism deals is not only more efficient it also
deals better with aliases between the pagecache and userspace mappings.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>