From: Eliav L. <eli...@gm...> - 2005-09-19 09:12:46
|
Hi, Can I Read/Write dato to the flash as to a standard harddisk (i.e. does th= e=20 flash has a finite number of read/write operations)? Eliav |
From: John D. <sv...@ot...> - 2005-09-19 09:39:02
Attachments:
smime.p7s
|
As far as I know, flash (NOR I suspect) that is on this chip, should be in the range of 10.000 to 100.000 writes. The JFFS (file system used on gumstix), supports a wear-levelling mechanism. So unless you re-flash the root image, and start from the beginning (you can do this at least 10.000 times), you can work A LOT on the flash of Gumstix. JFFS, uses a new (empty) flash sector, everytime you overwrite a file, and when disk gets full, it uses a garbage-collection-like algorithm, to format sectors and put them on the empty list. This way, even if you repeatedly write the same file, the file goes on different sectors, and does not wear a specific FLASH sector. The linux on this flash though, occupies the biggest part, so there are few free sectors and the filesystem will frequently re-format sectors. Using a CF or an SD/MMC, depending on the model you have, can be for some cases a better choice, since NAND Flash, that these devices use, can be re-programmed from 100.000 to 1.000.000 times. Its access-time though is much slower. The FAT16/32 filesystem though, does not support wear leveling. So the best way, (not tested) is to format an MMC with JFFS, and use it as a hard disk. In any case, reading the flash does not wear it, so you can do it as much as you like. Another way, would be to write things into /temp/ which is a Ramdrive, and periodically (schedule every few seconds) backup the data to another part of the filesystem, which is based on Flash. John. _____ From: gum...@li... [mailto:gum...@li...] On Behalf Of Eliav Levi Sent: Monday, September 19, 2005 12:13 PM To: gum...@li... Subject: [Gumstix-users] Flash FileSystem Hi, Can I Read/Write dato to the flash as to a standard harddisk (i.e. does the flash has a finite number of read/write operations)? Eliav |
From: Steve F. <st...@fo...> - 2005-09-20 07:46:55
|
"John Doukakis" <sv...@ot...> wrote: > JFFS, uses a new (empty) flash sector, everytime you overwrite a file..= . This is not correct. JFFS (and JFFS2) will fit as many files as it can into a sector. > The linux on this flash though, occupies the biggest part, so there are > few free sectors and the filesystem will frequently re-format sectors. Not on an XM!: # df Filesystem Size Used Available Use% Mounted on /dev/mtdblock2 15.8M 3.6M 12.1M 23% / |
From: Craig H. <cr...@gu...> - 2005-09-20 18:30:19
|
On Sep 20, 2005, at 12:46 AM, Steve Folta wrote: > "John Doukakis" <sv...@ot...> wrote: > >> JFFS, uses a new (empty) flash sector, everytime you overwrite a >> file... >> > > This is not correct. JFFS (and JFFS2) will fit as many files as it > can > into a sector. It will allocate a new PAGESIZE chunk though anytime you overwrite something, and that means 4kB each time, until it garbage collects all the dirty chunks. >> The linux on this flash though, occupies the biggest part, so >> there are >> few free sectors and the filesystem will frequently re-format >> sectors. >> > > Not on an XM!: > > # df > Filesystem Size Used Available Use% Mounted on > /dev/mtdblock2 15.8M 3.6M 12.1M 23% / Not even on a non-XM. the kernel is about 700kB or so, which is a fairly small part of even 4MB. C |
From: Steve F. <st...@fo...> - 2005-09-20 21:11:32
|
"Craig Hughes" <cr...@gu...> wrote: > [JFFS2] will allocate a new PAGESIZE chunk though anytime you overwrite > something, and that means 4kB each time, until it garbage collects > all the dirty chunks. That is not my understanding at all. What's your reference for that? Do the Gumstixen use NOR or NAND flash? |
From: Craig H. <cr...@gu...> - 2005-09-20 22:38:33
|
On Sep 20, 2005, at 2:11 PM, Steve Folta wrote: > "Craig Hughes" <cr...@gu...> wrote: > >> [JFFS2] will allocate a new PAGESIZE chunk though anytime you >> overwrite >> something, and that means 4kB each time, until it garbage collects >> all the dirty chunks. >> > > That is not my understanding at all. What's your reference for that? My understanding from http://sources.redhat.com/jffs2/jffs2-html/ node3.html and observing stuff like the output of df. I believe that when you try to write to a file, JFFS2 will mark the previously-used node for that chunk of data as "invalid", and allocate a new node (of size PAGESIZE) to write the data to. Eventually, the garbage collector will come through and clean up the invalid node(s). Also, I believe the garbage collector will take care of moving not-often-written blocks around in flash so as to deal with wear-levelling across the entire device. > Do the Gumstixen use NOR or NAND flash? NOR C |