• David Woodhouse's avatar
    [JFFS2] Use yield() between GC passes in background thread. · f8a922c7
    David Woodhouse authored
    The garbage collection thread is strictly an optimisation. Everything it
    does would also be done just-in-time in the context of something in
    userspace trying to access the file system.
    
    Sometimes, however, it's a pessimisation. Especially during early boot
    when it's checksumming nodes and scanning inodes which are shortly going
    to be pulled in by read_inode anyway. We end up building the rbtree of
    node coverage twice for the same inode.
    
    By switching to yield() instead of cond_resched() in the main loop, we
    observe boot times on the OLPC system going down from about 100 seconds to
    60.
    Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
    f8a922c7
background.c 4.07 KB