OSDN Git Service

blk-mq: optimise rq sort function
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 28 Nov 2019 21:11:53 +0000 (00:11 +0300)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Dec 2019 13:08:50 +0000 (06:08 -0700)
commit7d30a621028a22a9e8fbae5c5d8dc455869e4999
tree2ed626e9fce51d89849495a2ab5a8b68496fb4ce
parent80a0c2e511a97e11d82e0ec11564e2c3fe624b0d
blk-mq: optimise rq sort function

Check "!=" in multi-layer comparisons. The same memory usage, fewer
instructions, and 2 from 4 jumps are replaced with SETcc.

Note, that list_sort() doesn't differ 0 and <0.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c