Patch "block: only mark bio as tracked if it really is tracked" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    block: only mark bio as tracked if it really is tracked

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     block-only-mark-bio-as-tracked-if-it-really-is-track.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6a52efe5286829a926e77cfcfa00024fadfe5d1e
Author: Jens Axboe <axboe@xxxxxxxxx>
Date:   Fri Oct 15 20:06:18 2021 -0600

    block: only mark bio as tracked if it really is tracked
    
    [ Upstream commit 90b8faa0e8de1b02b619fb33f6c6e1e13e7d1d70 ]
    
    We set BIO_TRACKED unconditionally when rq_qos_throttle() is called, even
    though we may not even have an rq_qos handler. Only mark it as TRACKED if
    it really is potentially tracked.
    
    This saves considerable time for the case where the bio isn't tracked:
    
         2.64%     -1.65%  [kernel.vmlinux]  [k] bio_endio
    
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-rq-qos.h b/block/blk-rq-qos.h
index f000f83e0621..3cfbc8668cba 100644
--- a/block/blk-rq-qos.h
+++ b/block/blk-rq-qos.h
@@ -189,9 +189,10 @@ static inline void rq_qos_throttle(struct request_queue *q, struct bio *bio)
 	 * BIO_TRACKED lets controllers know that a bio went through the
 	 * normal rq_qos path.
 	 */
-	bio_set_flag(bio, BIO_TRACKED);
-	if (q->rq_qos)
+	if (q->rq_qos) {
+		bio_set_flag(bio, BIO_TRACKED);
 		__rq_qos_throttle(q->rq_qos, bio);
+	}
 }
 
 static inline void rq_qos_track(struct request_queue *q, struct request *rq,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux