Subject: Re: RFC: community requirements for a flash filesystem
To: None <tech-kern@NetBSD.org>
From: Jochen Kunz <firstname.lastname@example.org>
Date: 03/21/2006 09:53:18
On Mon, 20 Mar 2006 18:00:15 -0800
"Garrett D'Amore" <email@example.com> wrote:
> This is great when there is enough *RAM* to host the root filesystem.=20
> Often this isn't the case.
Ahhhm. The sqashfs and the JFFS2 that OpenWRT uses are both on the flash
chip. The sqashfs is just the initial / failback file system and JFFS2
is put on top of it to make it writable.
> For instance, one device I'm dealing with has 8MB RAM, and ~4MB
The WRT54G I instaled OpenWRT on has 2 MB flash and 8 MB RAM.
> Even given larger sizes, you don't really want to waste your RAM
> housing both the squashfs and the uncompressed binaries.
Sure, but you don't want to execute uncomressed binaries out of the flash.
If you use a uncompressed file system you can execute binaries right out
of the flash. (e.g. map flash blocks r/o containing the text segment
into a proces VM space.) This saves RAM. But typically flash is much
slower then RAM. And you need more flash as you can't compress the
binaries. If you look at the prices per MB of flash and DRAM you will se
that RAM is much cheaper. So if you sum it up, it is cheaper to use
compression on the flash and extract it into RAM.