linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] blk-mq: trivial helper and fixes comments
@ 2020-12-04 15:20 Minwoo Im
  2020-12-04 15:20 ` [PATCH 1/3] blk-mq: add helper allocating tagset->tags Minwoo Im
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Minwoo Im @ 2020-12-04 15:20 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Jens Axboe, 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,


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] blk-mq: add helper allocating tagset->tags
  2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
@ 2020-12-04 15:20 ` Minwoo Im
  2020-12-04 15:20 ` [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue Minwoo Im
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Minwoo Im @ 2020-12-04 15:20 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Jens Axboe, Minwoo Im

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 <minwoo.im.dev@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue
  2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
  2020-12-04 15:20 ` [PATCH 1/3] blk-mq: add helper allocating tagset->tags Minwoo Im
@ 2020-12-04 15:20 ` Minwoo Im
  2020-12-11 17:07   ` John Garry
  2020-12-04 15:20 ` [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds Minwoo Im
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Minwoo Im @ 2020-12-04 15:20 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Jens Axboe, 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 <minwoo.im.dev@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds
  2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
  2020-12-04 15:20 ` [PATCH 1/3] blk-mq: add helper allocating tagset->tags Minwoo Im
  2020-12-04 15:20 ` [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue Minwoo Im
@ 2020-12-04 15:20 ` Minwoo Im
  2020-12-11 17:00   ` John Garry
  2020-12-11 11:32 ` [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
  2020-12-12 18:14 ` Jens Axboe
  4 siblings, 1 reply; 8+ messages in thread
From: Minwoo Im @ 2020-12-04 15:20 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Jens Axboe, 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 <minwoo.im.dev@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] blk-mq: trivial helper and fixes comments
  2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
                   ` (2 preceding siblings ...)
  2020-12-04 15:20 ` [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds Minwoo Im
@ 2020-12-11 11:32 ` Minwoo Im
  2020-12-12 18:14 ` Jens Axboe
  4 siblings, 0 replies; 8+ messages in thread
From: Minwoo Im @ 2020-12-11 11:32 UTC (permalink / raw)
  To: linux-block, linux-kernel; +Cc: Jens Axboe

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!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds
  2020-12-04 15:20 ` [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds Minwoo Im
@ 2020-12-11 17:00   ` John Garry
  0 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2020-12-11 17:00 UTC (permalink / raw)
  To: Minwoo Im, linux-block, linux-kernel; +Cc: Jens Axboe

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<minwoo.im.dev@gmail.com>
> ---
Reviewed-by: John Garry <john.garry@huawei.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue
  2020-12-04 15:20 ` [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue Minwoo Im
@ 2020-12-11 17:07   ` John Garry
  0 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2020-12-11 17:07 UTC (permalink / raw)
  To: Minwoo Im, linux-block, linux-kernel; +Cc: Jens Axboe

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<minwoo.im.dev@gmail.com>

Reviewed-by: John Garry <john.garry@huawei.com>

> ---
>   block/blk-mq.h | 2 +-

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] blk-mq: trivial helper and fixes comments
  2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
                   ` (3 preceding siblings ...)
  2020-12-11 11:32 ` [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
@ 2020-12-12 18:14 ` Jens Axboe
  4 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2020-12-12 18:14 UTC (permalink / raw)
  To: Minwoo Im, linux-block, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-12 18:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 15:20 [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
2020-12-04 15:20 ` [PATCH 1/3] blk-mq: add helper allocating tagset->tags Minwoo Im
2020-12-04 15:20 ` [PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue Minwoo Im
2020-12-11 17:07   ` John Garry
2020-12-04 15:20 ` [PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds Minwoo Im
2020-12-11 17:00   ` John Garry
2020-12-11 11:32 ` [PATCH 0/3] blk-mq: trivial helper and fixes comments Minwoo Im
2020-12-12 18:14 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).