Subject: Re: more on understanding caches.
To: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-mips
Date: 06/29/2000 13:33:17
On Thu, Jun 29, 2000 at 02:05:08PM -0600, Michael L. Hitch wrote:

 >   Because the mips1 cache is write-through, so when an instruction is
 > modified (setting/clearing breakpoints), the data is written to memory.
 > The I cache is flushed to make sure the modified data is executed, not
 > the data in cache.

I think the problem here is that we're calling it an "I-cache flush",
when what it really means is "I-cache invalidate".

We should settle on a decent naming scheme, here.  I would suggest:

	Clean -- write-back (if necessary), but do not invalidate.
	Flush -- write-back (if necessary), and invalidate
	Invalidate -- not NOT perform any write-back, and invalidate

...Invalidate being an optimized case of Flush when you are expecting
the data that would be written out to be meaningless, and thus wasteful
in terms of time to write-back.

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