[PATCH 2/3] blk-wbt: Eliminate ambiguity in the comments of struct rq_wb

Tang Yizhou posted 3 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 2/3] blk-wbt: Eliminate ambiguity in the comments of struct rq_wb
Posted by Tang Yizhou 2 months, 1 week ago
From: Tang Yizhou <yizhou.tang@shopee.com>

In the current implementation, the last_issue and last_comp members of
struct rq_wb are used only by read requests and not by non-throttled write
requests. Therefore, eliminate the ambiguity here.

Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
---
 block/blk-wbt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 30886d44f6cd..eb8037bae0bd 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -85,8 +85,8 @@ struct rq_wb {
 	u64 sync_issue;
 	void *sync_cookie;
 
-	unsigned long last_issue;		/* last non-throttled issue */
-	unsigned long last_comp;		/* last non-throttled comp */
+	unsigned long last_issue;	/* issue time of last read rq */
+	unsigned long last_comp;	/* completion time of last read rq */
 	unsigned long min_lat_nsec;
 	struct rq_qos rqos;
 	struct rq_wait rq_wait[WBT_NUM_RWQ];
-- 
2.25.1
Re: [PATCH 2/3] blk-wbt: Eliminate ambiguity in the comments of struct rq_wb
Posted by Yu Kuai 2 months, 1 week ago
Hi,

在 2025/7/24 16:30, Tang Yizhou 写道:
> From: Tang Yizhou <yizhou.tang@shopee.com>
>
> In the current implementation, the last_issue and last_comp members of
> struct rq_wb are used only by read requests and not by non-throttled write
> requests. Therefore, eliminate the ambiguity here.
>
> Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
> ---
>   block/blk-wbt.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-wbt.c b/block/blk-wbt.c
> index 30886d44f6cd..eb8037bae0bd 100644
> --- a/block/blk-wbt.c
> +++ b/block/blk-wbt.c
> @@ -85,8 +85,8 @@ struct rq_wb {
>   	u64 sync_issue;
>   	void *sync_cookie;
>   
> -	unsigned long last_issue;		/* last non-throttled issue */
> -	unsigned long last_comp;		/* last non-throttled comp */
> +	unsigned long last_issue;	/* issue time of last read rq */
> +	unsigned long last_comp;	/* completion time of last read rq */
>   	unsigned long min_lat_nsec;
>   	struct rq_qos rqos;
>   	struct rq_wait rq_wait[WBT_NUM_RWQ];
Not sure if this is worth it, I'm more concerned about backport trouble.

Thanks,
Kuai
Re: [PATCH 2/3] blk-wbt: Eliminate ambiguity in the comments of struct rq_wb
Posted by Jan Kara 2 months, 1 week ago
On Thu 24-07-25 16:30:00, Tang Yizhou wrote:
> From: Tang Yizhou <yizhou.tang@shopee.com>
> 
> In the current implementation, the last_issue and last_comp members of
> struct rq_wb are used only by read requests and not by non-throttled write
> requests. Therefore, eliminate the ambiguity here.
> 
> Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  block/blk-wbt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/blk-wbt.c b/block/blk-wbt.c
> index 30886d44f6cd..eb8037bae0bd 100644
> --- a/block/blk-wbt.c
> +++ b/block/blk-wbt.c
> @@ -85,8 +85,8 @@ struct rq_wb {
>  	u64 sync_issue;
>  	void *sync_cookie;
>  
> -	unsigned long last_issue;		/* last non-throttled issue */
> -	unsigned long last_comp;		/* last non-throttled comp */
> +	unsigned long last_issue;	/* issue time of last read rq */
> +	unsigned long last_comp;	/* completion time of last read rq */
>  	unsigned long min_lat_nsec;
>  	struct rq_qos rqos;
>  	struct rq_wait rq_wait[WBT_NUM_RWQ];
> -- 
> 2.25.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR