linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service()
       [not found] <1611917485-584-1-git-send-email-brookxu@tencent.com>
@ 2021-02-10 11:13 ` Paolo Valente
  2021-02-10 15:20   ` Oleksandr Natalenko
       [not found] ` <1611917485-584-2-git-send-email-brookxu@tencent.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Paolo Valente @ 2021-02-10 11:13 UTC (permalink / raw)
  To: Chunguang Xu; +Cc: axboe, linux-block, linux-kernel



> Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
> 
> From: Chunguang Xu <brookxu@tencent.com>
> 
> The if statement at the end of the function is obviously useless,
> maybe we can delete it.
> 

Thanks for spotting this mistake.

Acked-by: Paolo Valente <paolo.valente@linaro.org>

> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
> ---
> block/bfq-wf2q.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
> index 26776bd..070e34a 100644
> --- a/block/bfq-wf2q.c
> +++ b/block/bfq-wf2q.c
> @@ -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;
> }
> 
> -- 
> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout()
       [not found] ` <1611917485-584-2-git-send-email-brookxu@tencent.com>
@ 2021-02-10 11:13   ` Paolo Valente
  2021-02-10 15:37     ` Oleksandr Natalenko
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Valente @ 2021-02-10 11:13 UTC (permalink / raw)
  To: Chunguang Xu; +Cc: axboe, linux-block, linux-kernel



> Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
> 
> From: Chunguang Xu <brookxu@tencent.com>
> 
> 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

> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
> ---
> block/bfq-iosched.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 9e4eb0f..4f40c61 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -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) &&
> -- 
> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service()
  2021-02-10 11:13 ` [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service() Paolo Valente
@ 2021-02-10 15:20   ` Oleksandr Natalenko
  2021-02-10 15:21     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Oleksandr Natalenko @ 2021-02-10 15:20 UTC (permalink / raw)
  To: Paolo Valente; +Cc: Chunguang Xu, axboe, linux-block, linux-kernel

On Wed, Feb 10, 2021 at 12:13:29PM +0100, Paolo Valente wrote:
> 
> 
> > Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
> > 
> > From: Chunguang Xu <brookxu@tencent.com>
> > 
> > The if statement at the end of the function is obviously useless,
> > maybe we can delete it.
> > 
> 
> Thanks for spotting this mistake.
> 
> Acked-by: Paolo Valente <paolo.valente@linaro.org>
> 
> > Signed-off-by: Chunguang Xu <brookxu@tencent.com>
> > ---
> > block/bfq-wf2q.c | 3 ---
> > 1 file changed, 3 deletions(-)
> > 
> > diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
> > index 26776bd..070e34a 100644
> > --- a/block/bfq-wf2q.c
> > +++ b/block/bfq-wf2q.c
> > @@ -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;
> > -

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

> > 	return parent_sched_may_change;
> > }
> > 
> > -- 
> > 1.8.3.1
> > 
> 

-- 
  Oleksandr Natalenko (post-factum)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service()
  2021-02-10 15:20   ` Oleksandr Natalenko
@ 2021-02-10 15:21     ` Jens Axboe
  2021-02-10 15:54       ` Paolo Valente
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2021-02-10 15:21 UTC (permalink / raw)
  To: Oleksandr Natalenko, Paolo Valente
  Cc: Chunguang Xu, linux-block, linux-kernel

On 2/10/21 8:20 AM, Oleksandr Natalenko wrote:
> On Wed, Feb 10, 2021 at 12:13:29PM +0100, Paolo Valente wrote:
>>
>>
>>> Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
>>>
>>> From: Chunguang Xu <brookxu@tencent.com>
>>>
>>> The if statement at the end of the function is obviously useless,
>>> maybe we can delete it.
>>>
>>
>> Thanks for spotting this mistake.
>>
>> Acked-by: Paolo Valente <paolo.valente@linaro.org>
>>
>>> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
>>> ---
>>> block/bfq-wf2q.c | 3 ---
>>> 1 file changed, 3 deletions(-)
>>>
>>> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
>>> index 26776bd..070e34a 100644
>>> --- a/block/bfq-wf2q.c
>>> +++ b/block/bfq-wf2q.c
>>> @@ -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;
>>> -
> 
> 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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout()
  2021-02-10 11:13   ` [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout() Paolo Valente
@ 2021-02-10 15:37     ` Oleksandr Natalenko
  0 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Natalenko @ 2021-02-10 15:37 UTC (permalink / raw)
  To: Paolo Valente; +Cc: Chunguang Xu, axboe, linux-block, linux-kernel

On Wed, Feb 10, 2021 at 12:13:59PM +0100, Paolo Valente wrote:
> 
> 
> > Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
> > 
> > From: Chunguang Xu <brookxu@tencent.com>
> > 
> > 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
> 
> > Signed-off-by: Chunguang Xu <brookxu@tencent.com>
> > ---
> > block/bfq-iosched.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> > index 9e4eb0f..4f40c61 100644
> > --- a/block/bfq-iosched.c
> > +++ b/block/bfq-iosched.c
> > @@ -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) &&
> > -- 
> > 1.8.3.1
> > 
> 

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

-- 
  Oleksandr Natalenko (post-factum)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service()
  2021-02-10 15:21     ` Jens Axboe
@ 2021-02-10 15:54       ` Paolo Valente
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Valente @ 2021-02-10 15:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Oleksandr Natalenko, Chunguang Xu, linux-block, linux-kernel



> Il giorno 10 feb 2021, alle ore 16:21, Jens Axboe <axboe@kernel.dk> ha scritto:
> 
> On 2/10/21 8:20 AM, Oleksandr Natalenko wrote:
>> On Wed, Feb 10, 2021 at 12:13:29PM +0100, Paolo Valente wrote:
>>> 
>>> 
>>>> Il giorno 29 gen 2021, alle ore 11:51, Chunguang Xu <brookxu.cn@gmail.com> ha scritto:
>>>> 
>>>> From: Chunguang Xu <brookxu@tencent.com>
>>>> 
>>>> The if statement at the end of the function is obviously useless,
>>>> maybe we can delete it.
>>>> 
>>> 
>>> Thanks for spotting this mistake.
>>> 
>>> Acked-by: Paolo Valente <paolo.valente@linaro.org>
>>> 
>>>> Signed-off-by: Chunguang Xu <brookxu@tencent.com>
>>>> ---
>>>> block/bfq-wf2q.c | 3 ---
>>>> 1 file changed, 3 deletions(-)
>>>> 
>>>> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
>>>> index 26776bd..070e34a 100644
>>>> --- a/block/bfq-wf2q.c
>>>> +++ b/block/bfq-wf2q.c
>>>> @@ -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;
>>>> -
>> 
>> 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.
> 

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

> -- 
> Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-10 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1611917485-584-1-git-send-email-brookxu@tencent.com>
2021-02-10 11:13 ` [PATCH 1/2] bfq: remove some useless logic of bfq_update_next_in_service() Paolo Valente
2021-02-10 15:20   ` Oleksandr Natalenko
2021-02-10 15:21     ` Jens Axboe
2021-02-10 15:54       ` Paolo Valente
     [not found] ` <1611917485-584-2-git-send-email-brookxu@tencent.com>
2021-02-10 11:13   ` [PATCH 2/2] bfq: amend the function name of bfq_may_expire_for_budg_timeout() Paolo Valente
2021-02-10 15:37     ` Oleksandr Natalenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).