swap file over jffs2 partition

Jörn Engel joern at logfs.org
Fri Feb 29 14:57:40 EST 2008

On Fri, 29 February 2008 19:29:53 +0200, Dimitrios Apostolou wrote:
> Thanks and sorry for intruding LKML. It seems that even wikipedia has 
> wrong address for the mailing list, see the last link of the article:
> http://en.wikipedia.org/wiki/JFFS2

Fixed.  Not that I actually read the page and checked for other

> Interesting. I guess nobody has experimented with it yet so I'll try. 
> Unfortunately it seems I'll face another problem, that JFFS2 doesn't 
> support having a swap-file at all. Why would this happen? More info:
> http://dev.laptop.org/ticket/6469

Yes, this still requires a bit of work.  Peter Zijlstra has a patch for
the memory-management side of it, someone has to fix up jffs2 as well.
I'll add support to logfs fairly soon.

> Of course! I intend to use all the 1GB of flash only for swap, the 
> system will be practically diskless. And I don't think enabling 
> compression for such a task would be wise.

It might, actually.  Assuming your average swap page compresses to 50%,
it means that you use half the bandwidth to flash and get twice the
lifetime before blocks wear out.  Whether the performance gets better or
worse depends on the relative speeds of your CPU and flash.


Joern's library part 10:

More information about the linux-mtd mailing list