]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
blk-wbt: Fix some comments
authorTang Yizhou <yizhou.tang@shopee.com>
Thu, 13 Feb 2025 10:06:10 +0000 (18:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Feb 2025 15:43:52 +0000 (08:43 -0700)
wbt_wait() no longer uses a spinlock as a parameter. Update the function
comments accordingly.

RWB_UNKNOWN_BUMP is used when we gradually adjust scale_steps toward the
center state, which is a value of 0.

Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20250213100611.209997-2-yizhou.tang@shopee.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-wbt.c

index 6dfc659d22e2b744bde01a7e24426e291d6f7b53..8b73c0c11aecdc2baf945b5c89339783af18539e 100644 (file)
@@ -136,8 +136,9 @@ enum {
        RWB_MIN_WRITE_SAMPLES   = 3,
 
        /*
-        * If we have this number of consecutive windows with not enough
-        * information to scale up or down, scale up.
+        * If we have this number of consecutive windows without enough
+        * information to scale up or down, slowly return to center state
+        * (step == 0).
         */
        RWB_UNKNOWN_BUMP        = 5,
 };
@@ -638,11 +639,7 @@ static void wbt_cleanup(struct rq_qos *rqos, struct bio *bio)
        __wbt_done(rqos, flags);
 }
 
-/*
- * May sleep, if we have exceeded the writeback limits. Caller can pass
- * in an irq held spinlock, if it holds one when calling this function.
- * If we do sleep, we'll release and re-grab it.
- */
+/* May sleep, if we have exceeded the writeback limits. */
 static void wbt_wait(struct rq_qos *rqos, struct bio *bio)
 {
        struct rq_wb *rwb = RQWB(rqos);