[07/20] block, bfq: simpfy check for interactive bfqq in bfq_update_wr_data

Message ID 20221101093417.10540-8-shikemeng@huawei.com
State New
Headers
Series A few bugfix and cleanup patches for bfq-iosched |

Commit Message

Kemeng Shi Nov. 1, 2022, 9:34 a.m. UTC
  The bfqq->wr_coeff will be set to bfqd->bfq_wr_coeff if bfqq is in
interactive weight raising. So we can simpfy interactive weight raising
check in function bfq_update_wr_data.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
 block/bfq-iosched.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 20ae52882235..15e7d6c6fa83 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -4997,8 +4997,7 @@  static void bfq_update_wr_data(struct bfq_data *bfqd, struct bfq_queue *bfqq)
 				bfqq->entity.prio_changed = 1;
 			}
 		}
-		if (bfqq->wr_coeff > 1 &&
-		    bfqq->wr_cur_max_time != bfqd->bfq_wr_rt_max_time &&
+		if (bfqq->wr_coeff == bfqd->bfq_wr_coeff &&
 		    bfqq->service_from_wr > max_service_from_wr) {
 			/* see comments on max_service_from_wr */
 			bfq_bfqq_end_wr(bfqq);