• N
    f2fs: remove the blk_plug usage in f2fs_write_data_pages · fa9150a8
    Namjae Jeon 提交于
    Let's consider the usage of blk_plug in f2fs_write_data_pages().
    We can come up with the two issues: lock contention and task awareness.
    
    1. Merging bios prior to grabing "queue lock"
     The f2fs merges consecutive IOs in the file system level before
     submitting any bios, which is similar with the back merge by the
     plugging mechanism in attempt_plug_merge(). Both of them need to acquire
     no queue lock.
    
    2. Merging policy with respect to tasks
     The f2fs merges IOs as much as possible regardless of tasks, while
     blk-plugging is conducted on a basis of tasks. As we can understand
     there are trade-offs, f2fs tries to maximize the write performance with
     well-merged bios.
    
    As a result, if f2fs produces many consecutive but separated bios in
    writepages(), it would be good to use blk-plugging since f2fs would be
    able to avoid queue lock contention in the block layer by merging them.
    But, f2fs merges IOs and submit one bio, which means that there are not
    much chances to merge bios by attempt_plug_merge().
    
    However, f2fs has already been used blk_plug by triggering generic_writepages()
    in f2fs_write_data_pages().
    So to make the overall code consistency, I'd like to remove blk_plug there.
    Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
    Signed-off-by: NAmit Sahrawat <a.sahrawat@samsung.com>
    Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
    fa9150a8
data.c 17.0 KB