blk-mq: add tag allocation policy
This is the blk-mq part to support tag allocation policy. The default allocation policy isn't changed (though it's not a strict FIFO). The new policy is round-robin for libata. But it's a try-best implementation. If multiple tasks are competing, the tags returned will be mixed (which is unavoidable even with !mq, as requests from different tasks can be mixed in queue) Cc: Jens Axboe <axboe@fb.com> Cc: Tejun Heo <tj@kernel.org> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by:Shaohua Li <shli@fb.com> Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- block/blk-mq-tag.c 24 additions, 15 deletionsblock/blk-mq-tag.c
- block/blk-mq-tag.h 3 additions, 1 deletionblock/blk-mq-tag.h
- block/blk-mq.c 2 additions, 1 deletionblock/blk-mq.c
- drivers/scsi/scsi_lib.c 2 additions, 0 deletionsdrivers/scsi/scsi_lib.c
- include/linux/blk-mq.h 8 additions, 0 deletionsinclude/linux/blk-mq.h
Please register or sign in to comment