Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This 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.


  Search this Thread
Old 01-04-2013, 04:49 PM   #1
LQ Newbie
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
JFFS2 Garbage Collection causing mtd do_write_buffer timeouts?


My first 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)

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?

Thanks for reading this far...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there any tools to test MTD/JFFS2 for Linux 2.4 kernels wcrandthor Linux - Software 2 12-14-2012 05:03 PM
JFFS2 garbage collect crash plumpfern Linux - Kernel 1 08-10-2012 02:45 PM
Garbage collection in C MTK358 Programming 1 01-07-2010 09:02 AM
kernel config for arm/mtd/jffs2? PatM Linux - Embedded & Single-board computer 3 08-29-2008 01:35 PM
ARM9 linux2.6.15 MTD jffs2 for help hall919 Linux - Hardware 0 12-05-2006 09:34 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration