• Chris Mason's avatar
    Btrfs: Worker thread optimizations · 35d8ba66
    Chris Mason authored
    This changes the worker thread pool to maintain a list of idle threads,
    avoiding a complex search for a good thread to wake up.
    
    Threads have two states:
    
    idle - we try to reuse the last thread used in hopes of improving the batching
    ratios
    
    busy - each time a new work item is added to a busy task, the task is
    rotated to the end of the line.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    35d8ba66
async-thread.c 8.62 KB