[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cached cramfs?

On Wednesday 11 September 2002 21.56, Jarkko Tuomi wrote:
> > > The compressed parts of flash (including /) are copied to RAM at
> > > boottime, so this shouldn't matter.
> >
> > Are you _realy_ sure of that? If so, where does it happen? I can't find
> > it out. The compressed kernel are copied to ram thought, that I can see.
> Oops, sorry! Filesystem caching seems to work so well that just copying
> some files to ramdisk doensn't necessarily create activity on flash /CS.
> Compressed kernel and cramfs image reside on the same partition but they
> are _not_ compressed at the same time, making it possible to read just
> individual files, of course..
> But back to the original question, where's the point? Data is decompressed
> to RAM anyway and run there. The bus would run in bursts with cache, but at
> least the flash chip that comes with Devboard LX doesn't benefit from
> bursting at all. (Due to instruction execution there seems to be a  30ns
> gap between single read accesses to flash, but these would occur anyway
> after a full line has been read to cache.)
> Jarkko

Yes, you are right.
If I remember the discussion internally correct it was first due to cache 
coherence problem when accessing the flash - since you erase it and program 
it with magic sequences you have to flush the caches in software when 
programming the flash which is rather inefficient.
I also think we found that there was no performance gain by using the cached 
mapping, we need to decompress the data anyway so we 
wont likely reuse the original data, and we can't do burst reads from the
flash anyway
so there is no point in replacing useful data in the cache (i.e code) 
with something we only read once.