• Pavel Begunkov's avatar
    blk-mq: optimise blk_mq_flush_plug_list() · 95ed0c5b
    Pavel Begunkov authored
    Instead of using list_del_init() in a loop, that generates a lot of
    unnecessary memory read/writes, iterate from the first request of a
    batch and cut out a sublist with list_cut_before().
    
    Apart from removing the list node initialisation part, this is more
    register-friendly, and the assembly uses the stack less intensively.
    
    list_empty() at the beginning is done with hope, that the compiler can
    optimise out the same check in the following list_splice_init().
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    95ed0c5b
blk-mq.c 85.5 KB