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(-)
--
2.17.1
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]>
---
block/blk-mq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.h b/block/blk-mq.h
index c696515766c7..c1458d9502f1 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -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,
--
2.17.1
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]>
---
block/blk-mq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 69771ba18f1f..284d103bd0e7 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -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)
{
--
2.17.1
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.
Signed-off-by: Minwoo Im <[email protected]>
---
block/blk-mq.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 37c682855a63..69771ba18f1f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -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;
--
2.17.1
On 20-12-05 00:20:52, Minwoo Im wrote:
> 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(-)
>
> --
> 2.17.1
>
Hello,
Gentle ping.
Thanks!
On 04/12/2020 15:20, Minwoo Im wrote:
> 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]>
> ---
Reviewed-by: John Garry <[email protected]>
On 04/12/2020 15:20, Minwoo Im wrote:
> 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]>
Reviewed-by: John Garry <[email protected]>
> ---
> block/blk-mq.h | 2 +-
On 12/4/20 8:20 AM, Minwoo Im wrote:
> 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.
--
Jens Axboe