• Chao Yu's avatar
    f2fs: split discard command in prior to block layer · 35ec7d57
    Chao Yu authored
    Some devices has small max_{hw,}discard_sectors, so that in
    __blkdev_issue_discard(), one big size discard bio can be split
    into multiple small size discard bios, result in heavy load in IO
    scheduler and device, which can hang other sync IO for long time.
    
    Now, f2fs is trying to control discard commands more elaboratively,
    in order to make less conflict in between discard IO and user IO
    to enhance application's performance, so in this patch, we will
    split discard bio in f2fs in prior to in block layer to reduce
    issuing multiple discard bios in a short time.
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    35ec7d57
segment.c 108 KB