• Jens Axboe's avatar
    block: add queue flag for disabling SG merging · 05f1dd53
    Jens Axboe authored
    If devices are not SG starved, we waste a lot of time potentially
    collapsing SG segments. Enough that 1.5% of the CPU time goes
    to this, at only 400K IOPS. Add a queue flag, QUEUE_FLAG_NO_SG_MERGE,
    which just returns the number of vectors in a bio instead of looping
    over all segments and checking for collapsible ones.
    
    Add a BLK_MQ_F_SG_MERGE flag so that drivers can opt-in on the sg
    merging, if they so desire.
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    05f1dd53
blk-merge.c 14.4 KB