Skip to content

Commit

Permalink
blk-mq: set default timeout as 30 seconds
Browse files Browse the repository at this point in the history
It is reasonable to set default timeout of request as 30 seconds instead of
30000 ticks, which may be 300 seconds if HZ is 100, for example, some arm64
based systems may choose 100 HZ.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Fixes: c76cbbc ("blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue()"
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Ming Lei authored and Jens Axboe committed Jul 16, 2015
1 parent 7bee607 commit e56f698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,7 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
goto err_hctxs;

setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q);
blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30000);
blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30 * HZ);

q->nr_queues = nr_cpu_ids;
q->nr_hw_queues = set->nr_hw_queues;
Expand Down

0 comments on commit e56f698

Please sign in to comment.