Skip to contentSkip to conversation

bfq: remove some useless logic of bfq_update_next_in_service()

PATCH Paolo Valente 3 participants 6 messages Feb 10, 2021 2 messages not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Paolo Valente

author Acked-by
#1 lore raw
Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The if statement at the end of the function is obviously useless, maybe we can delete it.

Thanks for spotting this mistake.

Quoted 22 lines

---
block/bfq-wf2q.c | 3 ---

1 file changed, 3 deletions(-)
block/bfq-wf2q.c +0 -3
index 26776bd..070e34a 100644
@@ -137,9 +137,6 @@ static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
 
 	sd->next_in_service = next_in_service;
 
-	if (!next_in_service)
-		return parent_sched_may_change;
-
 	return parent_sched_may_change;
 }
 
Signature · 1 line
1.8.3.1
#2 lore raw
Quoted 25 lines · Paolo Valente
Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The if statement at the end of the function is obviously useless, maybe we can delete it.

Thanks for spotting this mistake.

Quoted 11 lines

---
block/bfq-wf2q.c | 3 ---

1 file changed, 3 deletions(-)
block/bfq-wf2q.c +0 -0
index 26776bd..070e34a 100644
@@ -137,9 +137,6 @@ static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
 
Quoted 5 lines

block/bfq-wf2q.c static bool bfq_update_next_in_service(struct bfq_sched_data *sd, · line 142

Quoted 5 lines
block/bfq-wf2q.c +0 -3
 	sd->next_in_service = next_in_service;
 
-	if (!next_in_service)
-		return parent_sched_may_change;
-

Unless I'm missing something, this has already been fixed here:

https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.12/block&id=1a23e06cdab2be07cbda460c6417d7de564c48e6

Quoted 7 lines
Quoted 6 lines
block/bfq-wf2q.c +0 -0
 	return parent_sched_may_change;
 }
 
Signature · 1 line
1.8.3.1
Signature · 1 line
  Oleksandr Natalenko (post-factum)
maintainer
#3 lore raw
Quoted 28 lines · Oleksandr Natalenko
Quoted 27 lines · Paolo Valente
Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The if statement at the end of the function is obviously useless, maybe we can delete it.

Thanks for spotting this mistake.

Quoted 13 lines

---
block/bfq-wf2q.c | 3 ---

1 file changed, 3 deletions(-)
block/bfq-wf2q.c +0 -0
index 26776bd..070e34a 100644
@@ -137,9 +137,6 @@ static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
 
 	sd->next_in_service = next_in_service;
 
Quoted 7 lines
Quoted 3 lines

block/bfq-wf2q.c static bool bfq_update_next_in_service(struct bfq_sched_data *sd, · line 142

Quoted 3 lines
block/bfq-wf2q.c +0 -3
-	if (!next_in_service)
-		return parent_sched_may_change;
-

Unless I'm missing something, this has already been fixed here:

https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.12/block&id=1a23e06cdab2be07cbda460c6417d7de564c48e6

Yep indeed.

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 39 lines

Il giorno 10 feb 2021, alle ore 16:21, Jens Axboe <[email protected]> ha scritto:

Quoted 34 lines · Oleksandr Natalenko
Quoted 25 lines · Paolo Valente
Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The if statement at the end of the function is obviously useless, maybe we can delete it.

Thanks for spotting this mistake.

Quoted 11 lines

---
block/bfq-wf2q.c | 3 ---

1 file changed, 3 deletions(-)
block/bfq-wf2q.c +0 -0
index 26776bd..070e34a 100644
@@ -137,9 +137,6 @@ static bool bfq_update_next_in_service(struct bfq_sched_data *sd,
 
Quoted 5 lines

block/bfq-wf2q.c static bool bfq_update_next_in_service(struct bfq_sched_data *sd, · line 142

Quoted 5 lines
block/bfq-wf2q.c +0 -3
 	sd->next_in_service = next_in_service;
 
-	if (!next_in_service)
-		return parent_sched_may_change;
-

Unless I'm missing something, this has already been fixed here:

Quoted 4 lines
Quoted 1 line

https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.12/block&id=1a23e06cdab2be07cbda460c6417d7de564c48e6

Yep indeed.

I seemed to remember this patch as well. But my memory is rather weak.

Quoted 2 lines
Signature · 1 line
Jens Axboe

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout()

Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The function name bfq_may_expire_for_budg_timeout() may be misspelled, try to fix it.

Ok for me to make this name longer.

Thanks,
Paolo

Quoted 39 lines

---
block/bfq-iosched.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
block/bfq-iosched.c +3 -3
index 9e4eb0f..4f40c61 100644
@@ -4061,7 +4061,7 @@ static bool bfq_bfqq_budget_timeout(struct bfq_queue *bfqq)
 * condition does not hold, or if the queue is slow enough to deserve
 * only to be kicked off for preserving a high throughput.
 */
-static bool bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq)
+static bool bfq_may_expire_for_budget_timeout(struct bfq_queue *bfqq)
 {
 	bfq_log_bfqq(bfqq->bfqd, bfqq,
 		"may_budget_timeout: wait_request %d left %d timeout %d",
@@ -4350,7 +4350,7 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd)
 	 * on the case where bfq_bfqq_must_idle() returns true, in
 	 * bfq_completed_request().
 	 */
-	if (bfq_may_expire_for_budg_timeout(bfqq) &&
+	if (bfq_may_expire_for_budget_timeout(bfqq) &&
 	    !bfq_bfqq_must_idle(bfqq))
 		goto expire;
 
@@ -5706,7 +5706,7 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)
 			 * of its reserved service guarantees.
 			 */
 			return;
-		} else if (bfq_may_expire_for_budg_timeout(bfqq))
+		} else if (bfq_may_expire_for_budget_timeout(bfqq))
 			bfq_bfqq_expire(bfqd, bfqq, false,
 					BFQQE_BUDGET_TIMEOUT);
 		else if (RB_EMPTY_ROOT(&bfqq->sort_list) &&
Signature · 1 line
1.8.3.1
#7 lore raw

Re: [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout()

Quoted 42 lines · Paolo Valente
Quoted 9 lines

Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <[email protected]> ha scritto:

From: Chunguang Xu <[email protected]>

The function name bfq_may_expire_for_budg_timeout() may be misspelled, try to fix it.

Ok for me to make this name longer.

Thanks,
Paolo

Quoted 27 lines

---
block/bfq-iosched.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
block/bfq-iosched.c +2 -2
index 9e4eb0f..4f40c61 100644
@@ -4061,7 +4061,7 @@ static bool bfq_bfqq_budget_timeout(struct bfq_queue *bfqq)
 * condition does not hold, or if the queue is slow enough to deserve
 * only to be kicked off for preserving a high throughput.
 */
-static bool bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq)
+static bool bfq_may_expire_for_budget_timeout(struct bfq_queue *bfqq)
 {
 	bfq_log_bfqq(bfqq->bfqd, bfqq,
 		"may_budget_timeout: wait_request %d left %d timeout %d",
@@ -4350,7 +4350,7 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd)
 	 * on the case where bfq_bfqq_must_idle() returns true, in
 	 * bfq_completed_request().
 	 */
-	if (bfq_may_expire_for_budg_timeout(bfqq) &&
+	if (bfq_may_expire_for_budget_timeout(bfqq) &&
 	    !bfq_bfqq_must_idle(bfqq))
 		goto expire;
 
Quoted 13 lines
Quoted 12 lines
block/bfq-iosched.c +1 -1
@@ -5706,7 +5706,7 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)
 			 * of its reserved service guarantees.
 			 */
 			return;
-		} else if (bfq_may_expire_for_budg_timeout(bfqq))
+		} else if (bfq_may_expire_for_budget_timeout(bfqq))
 			bfq_bfqq_expire(bfqd, bfqq, false,
 					BFQQE_BUDGET_TIMEOUT);
 		else if (RB_EMPTY_ROOT(&bfqq->sort_list) &&
Signature · 1 line
1.8.3.1

Was this sent to some mailing list? I don't see an original email with this patch.

Signature · 1 line
  Oleksandr Natalenko (post-factum)