aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-01-23 16:18:00 -0500
committerJens Axboe <axboe@fb.com>2015-01-23 16:18:00 -0500
commit24391c0dc57c3756a219defaa781e68637d6ab7d (patch)
tree4d0e5b213c017e622d69d916c9e13e7f6e805368 /block/blk-mq.c
parentee1b6f7aff94019c09e73837054979063f722046 (diff)
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>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a7d4a988516f..eb8e694fda06 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1374,7 +1374,8 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
1374 size_t rq_size, left; 1374 size_t rq_size, left;
1375 1375
1376 tags = blk_mq_init_tags(set->queue_depth, set->reserved_tags, 1376 tags = blk_mq_init_tags(set->queue_depth, set->reserved_tags,
1377 set->numa_node); 1377 set->numa_node,
1378 BLK_MQ_FLAG_TO_ALLOC_POLICY(set->flags));
1378 if (!tags) 1379 if (!tags)
1379 return NULL; 1380 return NULL;
1380 1381