This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Re: RE : JFFS2 for NAND flash file system
- From: Lambrecht Jürgen <J dot Lambrecht at TELEVIC dot com>
- To: 'Paul MAILLET' <paulmaillet37 at gmail dot com>, "ecos-discuss at ecos dot sourceware dot org" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 1 Jun 2011 09:28:13 +0200
- Subject: RE: [ECOS] Re: RE : JFFS2 for NAND flash file system
- References: <BANLkTimXMWKORK85r74wuQnF5zvuqOaXnw@mail.gmail.com> <BANLkTi=gyorSa2HKm-237g8h_VQZA6fucA@mail.gmail.com>
Hello Paul,
it has been a while, but this is what I remember from JFFS2:
- on writing data, at minimum 128B is always written (is a configuration option, check ecos.ecc) in a node, and the maximum is 4kB (also a configuration option) before a new node is started
- such a node needs meta-data; when using dynamic allocation, each node will consume 24B; when using the static allocation option it only consumes the needed 16B
- Per file there is also file meta-data, 64B I think.
- be careful with writing a file in small chunks: for each write a node is created. When opening the file again, each node consumes 100B of RAM; so opening a 1000B file written in 100 times 10B, will consume 100*100B of RAM! And this also thrashes your file system - and when your file system is full, a garbage collect will be done, and that can easily time-out a TFTP-write.
- JFFS2 needs a lot of RAM, for example for a 60MB partition, you really need 1MB of RAM for JFFS2 only, even better 2MB.
- if JFFS2 will run on a system that will normally be never powered-down, and if you use JFFS2 to write to, you need to do some garbage collect from time to time, but garbage collect is not thread-safe..
Success,
Jürgen
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-
> owner@ecos.sourceware.org] On Behalf Of Paul MAILLET
> Sent: dinsdag 31 mei 2011 17:04
> To: ecos-discuss@ecos.sourceware.org
> Subject: [ECOS] Re: RE : JFFS2 for NAND flash file system
>
> Hi,
>
> I have been able to configure and run JFFS2 on my target, I have
> successfully tested basics functionalities. As my target use NAND
> flash and JFFS2 doesn't support it, I would like to know if it is
> really problematic or dangerous or anything that I should be aware of
> when using it on NAND flash device.
>
> Also I have looked for information about block usage like how many
> blocks are used when I create a directory or an empty file but I did
> not find these data.
>
> Can someone shed some ligth on this?
>
> Thanks,
> Best regards,
> Paul
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss