• T
    bcache: finish incremental GC · 5c25c4fc
    Tang Junhui 提交于
    In GC thread, we record the latest GC key in gc_done, which is expected
    to be used for incremental GC, but in currently code, we didn't realize
    it. When GC runs, front side IO would be blocked until the GC over, it
    would be a long time if there is a lot of btree nodes.
    
    This patch realizes incremental GC, the main ideal is that, when there
    are front side I/Os, after GC some nodes (100), we stop GC, release locker
    of the btree node, and go to process the front side I/Os for some times
    (100 ms), then go back to GC again.
    
    By this patch, when we doing GC, I/Os are not blocked all the time, and
    there is no obvious I/Os zero jump problem any more.
    
    Patch v2: Rename some variables and macros name as Coly suggested.
    Signed-off-by: NTang Junhui <tang.junhui@zte.com.cn>
    Signed-off-by: NColy Li <colyli@suse.de>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    5c25c4fc
request.c 32.9 KB