Skip to contentSkip to conversation

block: fix comments about choosing request list

PATCH In review Konstantin Khlebnikov 2 participants 3 messages Oct 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: fix comments about choosing request list

Request list is determined by blk_get_rl() and without queue_lock.

---
 include/linux/blk-cgroup.h |    8 ++++----
 include/linux/blkdev.h     |    9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)
include/linux/blk-cgroup.h +4 -4
index 6d766a19f2bb..dbff5a25f810 100644
@@ -520,10 +520,10 @@ static inline void blkg_put(struct blkcg_gq *blkg)
  * @q: request_queue of interest
  * @bio: bio which will be attached to the allocated request (may be %NULL)
  *
- * The caller wants to allocate a request from @q to use for @bio.  Find
- * the request_list to use and obtain a reference on it.  Should be called
- * under queue_lock.  This function is guaranteed to return non-%NULL
- * request_list.
+ * The caller wants to allocate a request from @q to use for @bio.
+ * Find the request_list to use and obtain a reference on it.
+ *
+ * This function is guaranteed to return non-%NULL request_list.
  */
 static inline struct request_list *blk_get_rl(struct request_queue *q,
 					      struct bio *bio)
include/linux/blkdev.h +5 -4
index 6980014357d4..b5fec0bc72f2 100644
@@ -444,10 +444,11 @@ struct request_queue {
 	struct rq_qos		*rq_qos;
 
 	/*
-	 * If blkcg is not used, @q->root_rl serves all requests.  If blkcg
-	 * is used, root blkg allocates from @q->root_rl and all other
-	 * blkgs from their own blkg->rl.  Which one to use should be
-	 * determined using bio_request_list().
+	 * If blkcg is not used, @q->root_rl serves all requests.
+	 * If blkcg is used, root blkg allocates from @q->root_rl and
+	 * all other blkgs from their own blkg->rl.
+	 *
+	 * Which one to use should be determined using blk_get_rl().
 	 */
 	struct request_list	root_rl;
 
maintainer
#1 lore raw
Quoted 1 line · Konstantin Khlebnikov

Request list is determined by blk_get_rl() and without queue_lock.

This code is going away shortly, so let's just leave the comment alone.

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 6 lines · Jens Axboe
Quoted 1 line · Konstantin Khlebnikov

Request list is determined by blk_get_rl() and without queue_lock.

This code is going away shortly, so let's just leave the comment alone.

Ok, I see some patches in flight for 420

Probably they also fixes linking non-bio based request with cgroups? I've found that old stack calls blk_rq_set_rl() for all request while MQ do this only in blk_mq_bio_to_request,
in blk_mq_get_request() request gets only io-context.