blk-mq: trivial helper and fixes comments
cover blk-mq: trivial helper and fixes comments
Hello,
This patch set contains:
- Introduce a helper to allocate tagset tags for the first time without 'realloc' keyword that used to be taken.
- Fixes for comments need to be updated.
Please have a look.
Thanks,
Minwoo Im (3):
blk-mq: add helper allocating tagset->tags
blk-mq: update arg in comment of blk_mq_map_queue
blk-mq: fix msec comment from micro to milli seconds
block/blk-mq.c | 14 ++++++++++---- block/blk-mq.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 blk-mq: add helper allocating tagset->tags
tagset->set is allocated from blk_mq_alloc_tag_set() rather than being reallocated. This patch added a helper to make its meaning explicitly which is to allocate rather than to reallocate.
--- block/blk-mq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
block/blk-mq.c +7 -1
@@ -3377,6 +3377,12 @@ static int blk_mq_realloc_tag_set_tags(struct blk_mq_tag_set *set,return 0 ; } +static int blk_mq_alloc_tag_set_tags (struct blk_mq_tag_set *set, +int new_nr_hw_queues) +{ +return blk_mq_realloc_tag_set_tags (set,0 , new_nr_hw_queues); +} +/* * Alloc a tag set to be associated with one or more request queues. * May fail with EINVAL for various error conditions. May adjust the
@@ -3430,7 +3436,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)if (set->nr_maps ==1 && set->nr_hw_queues > nr_cpu_ids) set->nr_hw_queues = nr_cpu_ids; -if (blk_mq_realloc_tag_set_tags (set,0 , set->nr_hw_queues) <0 ) +if (blk_mq_alloc_tag_set_tags (set, set->nr_hw_queues) <0 )return -ENOMEM ; ret = -ENOMEM ;
Signature · 1 line
2.17.1
PATCH 2/3 blk-mq: update arg in comment of blk_mq_map_queue
In reply to Minwoo ImUpdate mis-named argument description of blk_mq_map_queue(). This patch also updates description that argument to software queue percpu context.
--- block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq.h +1 -1
@@ -99,7 +99,7 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue_type(struct request_queue ** blk_mq_map_queue() - map (cmd_flags,type) to hardware queue * @q: request queue * @flags: request command flags -* @cpu: cpu ctx +* @ctx: software queue cpu ctx */ static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, unsigned int flags,
Signature · 1 line
2.17.1
PATCH 3/3 blk-mq: fix msec comment from micro to milli seconds
In reply to Minwoo ImDelay to wait for queue running is milli second unit which is passed to delayed work via msecs_to_jiffies() which is to convert milliseconds to jiffies.
--- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
block/blk-mq.c +3 -3
@@ -1594,7 +1594,7 @@ static int blk_mq_hctx_next_cpu(struct blk_mq_hw_ctx *hctx)* __blk_mq_delay_run_hw_queue - Run (or schedule to run) a hardware queue. * @hctx: Pointer to the hardware queue to run. * @async: If we want to run the queue asynchronously. -* @msecs: Microseconds of delay to wait before running the queue. +* @msecs: Milliseconds of delay to wait before running the queue. * * If !@async, try to run the queue now. Else, run the queue asynchronously and * with a delay of @msecs.
@@ -1623,7 +1623,7 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,/** * blk_mq_delay_run_hw_queue - Run a hardware queue asynchronously. * @hctx: Pointer to the hardware queue to run. -* @msecs: Microseconds of delay to wait before running the queue. +* @msecs: Milliseconds of delay to wait before running the queue. * * Run a hardware queue asynchronously with a delay of @msecs. */
@@ -1687,7 +1687,7 @@ EXPORT_SYMBOL(blk_mq_run_hw_queues);/** * blk_mq_delay_run_hw_queues - Run all hardware queues asynchronously. * @q: Pointer to the request queue to run. -* @msecs: Microseconds of delay to wait before running the queues. +* @msecs: Milliseconds of delay to wait before running the queues. */ void blk_mq_delay_run_hw_queues (struct request_queue *q,unsigned long msecs) {
Signature · 1 line
2.17.1
Quoted 12 lines · Minwoo Im
Hello,
This patch set contains:
- Introduce a helper to allocate tagset tags for the first time without 'realloc' keyword that used to be taken.
- Fixes for comments need to be updated.Please have a look.
Thanks,
Quoted 12 lines
Minwoo Im (3):
blk-mq: add helper allocatingtagset->tags
blk-mq: update arg in comment ofblk_mq_map_queue
blk-mq: fix msec comment from micro to milli secondsblock/blk-mq.c | 14 ++++++++++---- block/blk-mq.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-)Signature · 1 line
2.17.1
Hello,
Gentle ping.
Thanks!
Re: [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds
In reply to Minwoo ImQuoted 6 lines · Minwoo Im
Delay to wait for queue running is milli second unit which is passed to delayed work via
msecs_to_jiffies()which is to convert milliseconds to jiffies.Signed-off-by Minwoo Im<[email protected]>---
Re: [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue
In reply to Minwoo ImQuoted 4 lines · Minwoo Im
Update mis-named argument description of
blk_mq_map_queue(). This patch also updates description that argument to software queue percpu context.Signed-off-by Minwoo Im<[email protected]>
Quoted 2 lines
--- block/blk-mq.h | 2 +-
Quoted 8 lines · Minwoo Im
Hello,
This patch set contains:
- Introduce a helper to allocate tagset tags for the first time without 'realloc' keyword that used to be taken.
- Fixes for comments need to be updated.Please have a look.
Applied, thanks.
Signature · 1 line
Jens Axboe