ubifs:Questions About Garbage Collection

辉少 wang502742203 at qq.com
Sun Jun 19 06:56:09 PDT 2016


Hi,MTD  lists
I meet some problems while using UBI file system recently.I make an experiment in which I write 2 files(1KB each) to UBI frequently.Normally it takes only several millseconds to finish writting 2 files every time,but what puzzles me is that it takes about 4 minutes to write once nearly every 20 to 30 minutes.I am wondering how can this problem happen?Does Garbage Collection lead to this? I mount UBIFS to a 33MiB MTD partion with "o -sync" option.By the way,if UBI is mounted in asynchronous mode, this problem never happens. Does GC(Garbage Collecton) differ in synchronous mode andasynchronous mode?  What I've leared from some documents is that GC thread is sleeping while writting files without interval until UBIFS is full in synchronous mode and at that point writing will become very slow, but in asynchronous mode, before data is  moved into flash media, GC thread will work when there is not enough free space, am I right?


Many Thanks,
Best Regards.


More information about the linux-mtd mailing list