• Chao Yu's avatar
    f2fs: avoid high cpu usage in discard thread · 49c60c67
    Chao Yu authored
    We take very long time to finish generic/476, this is because we will
    check consistence of all discard entries in global rb tree while
    traversing all different granularity pending lists, even when the list
    is empty, in order to avoid that unneeded overhead, we have to skip
    the check when coming up an empty list.
    
    generic/476 time consumption:
    					cost
    Before patch & w/o consistence check	57s
    Before patch & w/ consistence check	1426s
    After patch				78s
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    49c60c67
segment.c 97.3 KB