2009-08-27 05:24:31 nand operate very slow when nand flash is full then remove some files
everest zhang (CHINA)
We found a problem about nand flash operation as following:
Our project based on BF561, we use 1GBytes 8-bit sansung's nand flash and mounted as yaffs2 file system. when nand flash was wrote full, we will remove some old files to produce space by the command of "rm filename -rf", then new file can be wrote, but we found at this time nand flash write operation was very slow and make other threads slow too. we found the only method to fix this problem was eraseall this partition by the command of "eraseall /dev/mtdx" .
Anybody can tell me the proper method to fix the problem and why. thank firstly.
2009-08-27 05:29:08 Re: nand operate very slow when nand flash is full then remove some files
Mike Frysinger (UNITED STATES)
sounds like normal behavior to me. flash is full, fragmented, and needs constant erasing/updating. you can try asking on the yaffs2 mailing lists for any optimization tips.
2009-08-28 17:07:13 Re: nand operate very slow when nand flash is full then remove some files
Chris Brissette (UNITED STATES)
We did alot of research in this same "feature". Yaffs only does grabage collection of blocks on write operations. So if you delete a file and don't write to the filesystem the file isn't really removed from the hardware. It's normal, there is alot of info on yaffs, and it's been really helpful to learn more about how it operates. Also make sure that you are properly checkpointing the file system on shutdown, otherwise your boottimes can take forever.