Skip to contentSkip to conversation

blk-mq: Document some blk_mq_ctx fields

PATCH In review Nikolay Borisov 2 participants 3 messages Mar 11, 2021 – Apr 6, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blk-mq: Document some blk_mq_ctx fields

---
 block/blk-mq.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
block/blk-mq.h +17 -0
index 3616453ca28c..f0079e177bba 100644
@@ -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;
Signature · 1 line
2.25.1
#2 lore raw
In reply to Nikolay Borisov
Quoted 1 line · Nikolay Borisov

Ping

Quoted 46 lines
---
 block/blk-mq.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
block/blk-mq.h +17 -0
index 3616453ca28c..f0079e177bba 100644
@@ -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;