LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   JFFS2 Garbage Collection causing mtd do_write_buffer timeouts? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/jffs2-garbage-collection-causing-mtd-do_write_buffer-timeouts-4175444212/)

dpdonny 01-04-2013 04:49 PM

JFFS2 Garbage Collection causing mtd do_write_buffer timeouts?
 
Greetings,

My first post...so be kind.

Some data:
----------
- 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)

SUMMARY
-------
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.

DETAILS
-------
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.

QUESTIONS
---------
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?

Thanks for reading this far...


All times are GMT -5. The time now is 06:34 PM.