[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cached cramfs?
On Wed, 11 Sep 2002, Ronny L Nilsson 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.
In the older elinux-based releases, the kernel and RO filesystem (romfs)
were uncompressed to RAM at boottime (while the RW system was in JFFS on the
flash all the time). This gained some flash space because of the higher
compression (all is compressed together) but lost a LOT of RAM space since
everything had to be unpacked at once, and lost even more RAM since the lack
of an MMU meant the files had to be further copied to working space RAM when
programs were run.
In Linux 2.4/CRIS, the kernel is uncompressed to RAM at boot, while the
RO cramfs stays in flash, compressed on a page-by-page basis. The RW part is
JFFS on the flash as before. Flash usage is slightly higher but the RAM
usage is much lower.
Anyway when files are accessed from the RO system, the needed pages are
uncompressed from the flash, and this takes so much time compared to cache
line gains (and considering the lack of burst mode for the flash physical
access) that it does not matter that the access of the compressed data is
done uncached. Also, when the files are uncompressed they stay in the RAM
page cache until the memory is needed for something else so the actual flash
hits on a running system are very low unless you have a high memory