본문 바로가기

Job Notes/File System

YAFFS Garbage Collection

New garbage collector
If we're very low on erased blocks then we do aggressive garbage collection otherwise we do "leasurely" garbage collection.
Aggressive gc looks further (whole array) and will accept less dirty blocks.
Passive gc only inspects smaller areas and will only accept more dirty blocks.
The idea is to help clear out space in a more spread-out manner.
Dunno if it really does anything useful.

사용자 삽입 이미지

yaffs_CheckGarbageCollection


사용자 삽입 이미지

yaffs_FindBlockForGarbageCollection


사용자 삽입 이미지

yaffs_GarbageCollectBlock