USB mass storage and ARM cache coherency
Wolfgang Mües
wolfgang at iksw-muees.de
Sat Mar 6 05:56:41 EST 2010
Russell,
Am Donnerstag, 4. März 2010 10:31:17 schrieb Russell King - ARM Linux:
> You're assuming that every page is used in the same way. Here's some
> examples where this is wrong:
>
> 1. A page is faulted in for an application, and it is a text page.
> - the data read in to the page needs to be visible to the instruction
> stream, so on Harvard architecture machines, this may require cache
> maintainence on both the D and I caches.
Yes. I think that the EXPECTED behaviour of block devices is to give the
result of the read back in memory. So the driver should do the flush of the
data cache.
The invalidation of the I cache should be done by the function which makes
this piece of data executable. (Have I missed something here?)
> 3. A page may be read in response to an application issuing a read(2) call.
> - the data is read from the kernel mapping, and isn't mapped into a
> userspace address.
>
> So, in case (3), flushing the I and D caches could be completely wasteful
But how do you AVOID the writeback of the data cache in (3)?
IMHO, the dirty data is in the cache, and the cache will writeback this data
on its own.
regards
Wolfgang
--
Wahre Worte sind nicht schön - Schöne Worte sind nicht wahr. (Laotse)
More information about the linux-arm-kernel
mailing list