Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
- proprietary board with ARM processor booting out of NOR flash
- Linux kernel 3.1.0
- BusyBox v1.19.v
- JFFS2 mounted mtdblocks
- using JFFS2 for disk-like storage of images; not using JFFS2 for
root file system (that's in RAM)
I am seeing intermittent mtd do_write_buffer() timeouts when un'taring a large file (10MB) directly to flash and believe the cause to be a mutex issue with jffs2 garbage collection daemon.
Flash status returned in chip_ready() (cfi_cmdset_0002.c) when the timeouts occur indicate "Erase in progress" (DQ3=1, DQ2 toggling, DQ6 toggling), which shouldn't be the case when writing the flash. My guess is there is a mutex issue occurring with the jffs2_gcd_mtdX when it's erasing a block it recently collected.
I've killed the gcd thread and am currently re-running my test. I've yet to see a timeout.
Would jffs2 garbage collection erase contend with a write operation (especially when the write is large and takes a while)?
So should garbage collection be turned off when doing large writes to flash?