* [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt
@ 2025-02-13 10:06 Tang Yizhou
2025-02-13 10:06 ` [PATCH v2 1/2] blk-wbt: Fix some comments Tang Yizhou
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tang Yizhou @ 2025-02-13 10:06 UTC (permalink / raw)
To: yukuai1, axboe; +Cc: linux-block, linux-kernel, Tang Yizhou
From: Tang Yizhou <yizhou.tang@shopee.com>
v2: Take Yuai's advice. Modify the subject of patch #1. Move the
modifications to the comments for wb_timer_fn to patch #2.
Tang Yizhou (2):
blk-wbt: Fix some comments
blk-wbt: Cleanup a comment in wb_timer_fn
block/blk-wbt.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v2 1/2] blk-wbt: Fix some comments 2025-02-13 10:06 [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Tang Yizhou @ 2025-02-13 10:06 ` Tang Yizhou 2025-02-13 11:04 ` Yu Kuai 2025-02-13 10:06 ` [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn Tang Yizhou 2025-02-25 15:44 ` [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Jens Axboe 2 siblings, 1 reply; 8+ messages in thread From: Tang Yizhou @ 2025-02-13 10:06 UTC (permalink / raw) To: yukuai1, axboe; +Cc: linux-block, linux-kernel, Tang Yizhou From: Tang Yizhou <yizhou.tang@shopee.com> 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> --- block/blk-wbt.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 6dfc659d22e2..8b73c0c11aec 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -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); -- 2.25.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] blk-wbt: Fix some comments 2025-02-13 10:06 ` [PATCH v2 1/2] blk-wbt: Fix some comments Tang Yizhou @ 2025-02-13 11:04 ` Yu Kuai 2025-02-25 12:38 ` Yizhou Tang 0 siblings, 1 reply; 8+ messages in thread From: Yu Kuai @ 2025-02-13 11:04 UTC (permalink / raw) To: Tang Yizhou, yukuai1, axboe; +Cc: linux-block, linux-kernel, yukuai (C) Hi, 在 2025/02/13 18:06, Tang Yizhou 写道: > From: Tang Yizhou <yizhou.tang@shopee.com> > > 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> > --- > block/blk-wbt.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > LGTM Reviewed-by: Yu Kuai <yukuai3@huawei.com> > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > index 6dfc659d22e2..8b73c0c11aec 100644 > --- a/block/blk-wbt.c > +++ b/block/blk-wbt.c > @@ -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); > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] blk-wbt: Fix some comments 2025-02-13 11:04 ` Yu Kuai @ 2025-02-25 12:38 ` Yizhou Tang 0 siblings, 0 replies; 8+ messages in thread From: Yizhou Tang @ 2025-02-25 12:38 UTC (permalink / raw) To: Yu Kuai; +Cc: Tang Yizhou, axboe, linux-block, linux-kernel, yukuai (C) On Thu, Feb 13, 2025 at 7:06 PM Yu Kuai <yukuai1@huaweicloud.com> wrote: > > Hi, > > 在 2025/02/13 18:06, Tang Yizhou 写道: > > From: Tang Yizhou <yizhou.tang@shopee.com> > > > > 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> > > --- > > block/blk-wbt.c | 11 ++++------- > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > LGTM > Reviewed-by: Yu Kuai <yukuai3@huawei.com> Hi Jens, could you kindly review and consider merging this patch? Yi. > > > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > > index 6dfc659d22e2..8b73c0c11aec 100644 > > --- a/block/blk-wbt.c > > +++ b/block/blk-wbt.c > > @@ -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); > > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn 2025-02-13 10:06 [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Tang Yizhou 2025-02-13 10:06 ` [PATCH v2 1/2] blk-wbt: Fix some comments Tang Yizhou @ 2025-02-13 10:06 ` Tang Yizhou 2025-02-13 11:16 ` Yu Kuai 2025-02-25 15:44 ` [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Jens Axboe 2 siblings, 1 reply; 8+ messages in thread From: Tang Yizhou @ 2025-02-13 10:06 UTC (permalink / raw) To: yukuai1, axboe; +Cc: linux-block, linux-kernel, Tang Yizhou From: Tang Yizhou <yizhou.tang@shopee.com> The original comment contains a grammatical error. Rewrite it into a more easily understandable sentence. Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com> --- block/blk-wbt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 8b73c0c11aec..f1754d07f7e0 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -447,9 +447,9 @@ static void wb_timer_fn(struct blk_stat_callback *cb) break; case LAT_UNKNOWN_WRITES: /* - * We started a the center step, but don't have a valid - * read/write sample, but we do have writes going on. - * Allow step to go negative, to increase write perf. + * We don't have a valid read/write sample, but we do have + * writes going on. Allow step to go negative, to increase + * write performance. */ scale_up(rwb); break; -- 2.25.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn 2025-02-13 10:06 ` [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn Tang Yizhou @ 2025-02-13 11:16 ` Yu Kuai 2025-02-13 14:28 ` Tang Yizhou 0 siblings, 1 reply; 8+ messages in thread From: Yu Kuai @ 2025-02-13 11:16 UTC (permalink / raw) To: Tang Yizhou, yukuai1, axboe; +Cc: linux-block, linux-kernel, yukuai (C) Hi, 在 2025/02/13 18:06, Tang Yizhou 写道: > From: Tang Yizhou <yizhou.tang@shopee.com> > > The original comment contains a grammatical error. Rewrite it into a more > easily understandable sentence. > > Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com> > --- > block/blk-wbt.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Personally, I don't think this patch is necessary, people can still understand with this error. I'm not expecting a seperate patch :( Thanks, Kuai > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > index 8b73c0c11aec..f1754d07f7e0 100644 > --- a/block/blk-wbt.c > +++ b/block/blk-wbt.c > @@ -447,9 +447,9 @@ static void wb_timer_fn(struct blk_stat_callback *cb) > break; > case LAT_UNKNOWN_WRITES: > /* > - * We started a the center step, but don't have a valid > - * read/write sample, but we do have writes going on. > - * Allow step to go negative, to increase write perf. > + * We don't have a valid read/write sample, but we do have > + * writes going on. Allow step to go negative, to increase > + * write performance. > */ > scale_up(rwb); > break; > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn 2025-02-13 11:16 ` Yu Kuai @ 2025-02-13 14:28 ` Tang Yizhou 0 siblings, 0 replies; 8+ messages in thread From: Tang Yizhou @ 2025-02-13 14:28 UTC (permalink / raw) To: Yu Kuai; +Cc: axboe, linux-block, linux-kernel, yukuai (C) On Thu, Feb 13, 2025 at 7:17 PM Yu Kuai <yukuai1@huaweicloud.com> wrote: > > Hi, > > 在 2025/02/13 18:06, Tang Yizhou 写道: > > From: Tang Yizhou <yizhou.tang@shopee.com> > > > > The original comment contains a grammatical error. Rewrite it into a more > > easily understandable sentence. > > > > Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com> > > --- > > block/blk-wbt.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > Personally, I don't think this patch is necessary, people can still > understand with this error. I'm not expecting a seperate patch :( > > Thanks, > Kuai > Got it. Let's see if others have any suggestions. Thanks, Yi > > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > > index 8b73c0c11aec..f1754d07f7e0 100644 > > --- a/block/blk-wbt.c > > +++ b/block/blk-wbt.c > > @@ -447,9 +447,9 @@ static void wb_timer_fn(struct blk_stat_callback *cb) > > break; > > case LAT_UNKNOWN_WRITES: > > /* > > - * We started a the center step, but don't have a valid > > - * read/write sample, but we do have writes going on. > > - * Allow step to go negative, to increase write perf. > > + * We don't have a valid read/write sample, but we do have > > + * writes going on. Allow step to go negative, to increase > > + * write performance. > > */ > > scale_up(rwb); > > break; > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt 2025-02-13 10:06 [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Tang Yizhou 2025-02-13 10:06 ` [PATCH v2 1/2] blk-wbt: Fix some comments Tang Yizhou 2025-02-13 10:06 ` [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn Tang Yizhou @ 2025-02-25 15:44 ` Jens Axboe 2 siblings, 0 replies; 8+ messages in thread From: Jens Axboe @ 2025-02-25 15:44 UTC (permalink / raw) To: yukuai1, Tang Yizhou; +Cc: linux-block, linux-kernel On Thu, 13 Feb 2025 18:06:09 +0800, Tang Yizhou wrote: > v2: Take Yuai's advice. Modify the subject of patch #1. Move the > modifications to the comments for wb_timer_fn to patch #2. > > Tang Yizhou (2): > blk-wbt: Fix some comments > blk-wbt: Cleanup a comment in wb_timer_fn > > [...] Applied, thanks! [1/2] blk-wbt: Fix some comments commit: 5d01d2df85f01ce083e0372bd3bd4968155e2911 [2/2] blk-wbt: Cleanup a comment in wb_timer_fn commit: 8ac17e6ae1bf4625b8fa457f135865c1fd86beae Best regards, -- Jens Axboe ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-25 15:44 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-02-13 10:06 [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Tang Yizhou 2025-02-13 10:06 ` [PATCH v2 1/2] blk-wbt: Fix some comments Tang Yizhou 2025-02-13 11:04 ` Yu Kuai 2025-02-25 12:38 ` Yizhou Tang 2025-02-13 10:06 ` [PATCH v2 2/2] blk-wbt: Cleanup a comment in wb_timer_fn Tang Yizhou 2025-02-13 11:16 ` Yu Kuai 2025-02-13 14:28 ` Tang Yizhou 2025-02-25 15:44 ` [PATCH v2 0/2] Fix and cleanup some comments in blk-wbt Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®