diff mbox series

[08/15] blk-wbt: open code wbt_queue_depth_changed in wbt_update_limits

Message ID 20230117081257.3089859-9-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/15] blk-cgroup: don't defer blkg_free to a workqueue | expand

Commit Message

Christoph Hellwig Jan. 17, 2023, 8:12 a.m. UTC
No real need to all the method here, so open code to it to prepare
for some paramter passing changes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-wbt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andreas Herrmann Jan. 20, 2023, 9:21 a.m. UTC | #1
On Tue, Jan 17, 2023 at 09:12:50AM +0100, Christoph Hellwig wrote:
> No real need to all the method here, so open code to it to prepare
> for some paramter passing changes.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/blk-wbt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Looks good to me. Feel free to add
Reviewed-by: Andreas Herrmann <aherrmann@suse.de>

> diff --git a/block/blk-wbt.c b/block/blk-wbt.c
> index 542271fa99e8f7..473ae72befaf1a 100644
> --- a/block/blk-wbt.c
> +++ b/block/blk-wbt.c
> @@ -863,9 +863,9 @@ int wbt_init(struct gendisk *disk)
>  	rwb->enable_state = WBT_STATE_ON_DEFAULT;
>  	rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
>  	rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
> +	rwb->rq_depth.queue_depth = blk_queue_depth(q);
>  	rwb->min_lat_nsec = wbt_default_latency_nsec(q);
> -
> -	wbt_queue_depth_changed(&rwb->rqos);
> +	wbt_update_limits(rwb);
>  
>  	/*
>  	 * Assign rwb and add the stats callback.
> -- 
> 2.39.0
>
Hannes Reinecke Jan. 27, 2023, 7:07 a.m. UTC | #2
On 1/17/23 09:12, Christoph Hellwig wrote:
> No real need to all the method here, so open code to it to prepare
> for some paramter passing changes.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   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 542271fa99e8f7..473ae72befaf1a 100644
> --- a/block/blk-wbt.c
> +++ b/block/blk-wbt.c
> @@ -863,9 +863,9 @@ int wbt_init(struct gendisk *disk)
>   	rwb->enable_state = WBT_STATE_ON_DEFAULT;
>   	rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
>   	rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
> +	rwb->rq_depth.queue_depth = blk_queue_depth(q);
>   	rwb->min_lat_nsec = wbt_default_latency_nsec(q);
> -
> -	wbt_queue_depth_changed(&rwb->rqos);
> +	wbt_update_limits(rwb);
>   
>   	/*
>   	 * Assign rwb and add the stats callback.
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 542271fa99e8f7..473ae72befaf1a 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -863,9 +863,9 @@  int wbt_init(struct gendisk *disk)
 	rwb->enable_state = WBT_STATE_ON_DEFAULT;
 	rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
 	rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
+	rwb->rq_depth.queue_depth = blk_queue_depth(q);
 	rwb->min_lat_nsec = wbt_default_latency_nsec(q);
-
-	wbt_queue_depth_changed(&rwb->rqos);
+	wbt_update_limits(rwb);
 
 	/*
 	 * Assign rwb and add the stats callback.