linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: Document some blk_mq_ctx fields
@ 2021-03-11  8:17 Nikolay Borisov
  2021-03-11 11:19 ` Johannes Thumshirn
  2021-04-06  7:06 ` Nikolay Borisov
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Borisov @ 2021-03-11  8:17 UTC (permalink / raw)
  To: linux-block; +Cc: axboe, Nikolay Borisov

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 block/blk-mq.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/block/blk-mq.h b/block/blk-mq.h
index 3616453ca28c..f0079e177bba 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -17,12 +17,26 @@ struct blk_mq_ctxs {
  */
 struct blk_mq_ctx {
 	struct {
+		/** @lock: Protects the rq_lists */
 		spinlock_t		lock;
 		struct list_head	rq_lists[HCTX_MAX_TYPES];
 	} ____cacheline_aligned_in_smp;
 
+	/**
+	 * @cpu: id of cpu owning this context
+	 */
 	unsigned int		cpu;
+
+	/**
+	 * @index_hw: Number of software queues mapped to the hw queue for each
+	 * hardware queue type
+	 */
 	unsigned short		index_hw[HCTX_MAX_TYPES];
+
+	/**
+	 * @hctxs: Hardware queue this queue maps to for each hardware queue
+	 * type
+	 */
 	struct blk_mq_hw_ctx 	*hctxs[HCTX_MAX_TYPES];
 
 	/* incremented at dispatch time */
@@ -32,6 +46,9 @@ struct blk_mq_ctx {
 	/* incremented at completion time */
 	unsigned long		____cacheline_aligned_in_smp rq_completed[2];
 
+	/**
+	 * @queue: Pointer to the request queue that owns this software context.
+	 */
 	struct request_queue	*queue;
 	struct blk_mq_ctxs      *ctxs;
 	struct kobject		kobj;
-- 
2.25.1


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

* Re: [PATCH] blk-mq: Document some blk_mq_ctx fields
  2021-03-11  8:17 [PATCH] blk-mq: Document some blk_mq_ctx fields Nikolay Borisov
@ 2021-03-11 11:19 ` Johannes Thumshirn
  2021-04-06  7:06 ` Nikolay Borisov
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2021-03-11 11:19 UTC (permalink / raw)
  To: Nikolay Borisov, linux-block; +Cc: axboe

Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

* Re: [PATCH] blk-mq: Document some blk_mq_ctx fields
  2021-03-11  8:17 [PATCH] blk-mq: Document some blk_mq_ctx fields Nikolay Borisov
  2021-03-11 11:19 ` Johannes Thumshirn
@ 2021-04-06  7:06 ` Nikolay Borisov
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2021-04-06  7:06 UTC (permalink / raw)
  To: linux-block; +Cc: axboe



On 11.03.21 г. 10:17, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Ping

> ---
>  block/blk-mq.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/block/blk-mq.h b/block/blk-mq.h
> index 3616453ca28c..f0079e177bba 100644
> --- a/block/blk-mq.h
> +++ b/block/blk-mq.h
> @@ -17,12 +17,26 @@ struct blk_mq_ctxs {
>   */
>  struct blk_mq_ctx {
>  	struct {
> +		/** @lock: Protects the rq_lists */
>  		spinlock_t		lock;
>  		struct list_head	rq_lists[HCTX_MAX_TYPES];
>  	} ____cacheline_aligned_in_smp;
>  
> +	/**
> +	 * @cpu: id of cpu owning this context
> +	 */
>  	unsigned int		cpu;
> +
> +	/**
> +	 * @index_hw: Number of software queues mapped to the hw queue for each
> +	 * hardware queue type
> +	 */
>  	unsigned short		index_hw[HCTX_MAX_TYPES];
> +
> +	/**
> +	 * @hctxs: Hardware queue this queue maps to for each hardware queue
> +	 * type
> +	 */
>  	struct blk_mq_hw_ctx 	*hctxs[HCTX_MAX_TYPES];
>  
>  	/* incremented at dispatch time */
> @@ -32,6 +46,9 @@ struct blk_mq_ctx {
>  	/* incremented at completion time */
>  	unsigned long		____cacheline_aligned_in_smp rq_completed[2];
>  
> +	/**
> +	 * @queue: Pointer to the request queue that owns this software context.
> +	 */
>  	struct request_queue	*queue;
>  	struct blk_mq_ctxs      *ctxs;
>  	struct kobject		kobj;
> 

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

end of thread, other threads:[~2021-04-06  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  8:17 [PATCH] blk-mq: Document some blk_mq_ctx fields Nikolay Borisov
2021-03-11 11:19 ` Johannes Thumshirn
2021-04-06  7:06 ` Nikolay Borisov

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).