1425537a13
The greedy GC mode attempts to erase as many sectors as possible, and it is therefore a slow operation, since the flash driver must wait for about a second after erasing one sector. The former behavior was to always do a greedy GC if file reservations fails due to lack of space. The new reluctant GC stops after erasing one sector, and therefore we often do not have to wait if there is no file system operation in the time while the sector is being erased. We call the garbage collector using this mode when removing a file that is not a micro log file, since the remove function is called recursively for micro log files that are erased because the corresponding ordinary file is erased. This change increases the coffee test (examples/sky/test-coffee.c) speed from 9 to 5 seconds. |
||
---|---|---|
.. | ||
cfs-coffee.c | ||
cfs-coffee.h | ||
cfs-eeprom.c | ||
cfs-posix-dir.c | ||
cfs-posix.c | ||
cfs-ram.c | ||
cfs-xmem.c | ||
cfs.h |