diff mbox series

[v2] blk-rq-qos: remove redundant finish_wait to rq_qos_wait.

Message ID 20200628135625.3396636-1-guoxuenan@huawei.com (mailing list archive)
State New, archived
Headers show
Series [v2] blk-rq-qos: remove redundant finish_wait to rq_qos_wait. | expand

Commit Message

Guo Xuenan June 28, 2020, 1:56 p.m. UTC
It is no need do finish_wait twice after acquiring inflight.

Signed-off-by: Guo Xuenan <guoxuenan@huawei.com>
---
 block/blk-rq-qos.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jens Axboe June 28, 2020, 2:11 p.m. UTC | #1
On 6/28/20 7:56 AM, Guo Xuenan wrote:
> It is no need do finish_wait twice after acquiring inflight.

Thanks, applied.
Stephen Rothwell July 15, 2020, 2:19 a.m. UTC | #2
Hi all,

On Tue, 14 Jul 2020 19:21:24 -0400 Qian Cai <cai@lca.pw> wrote:
>
> On Sun, Jun 28, 2020 at 09:56:25AM -0400, Guo Xuenan wrote:
> > It is no need do finish_wait twice after acquiring inflight.
> > 
> > Signed-off-by: Guo Xuenan <guoxuenan@huawei.com>
> > ---
> >  block/blk-rq-qos.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c
> > index 656460636ad3..18f3eab9f768 100644
> > --- a/block/blk-rq-qos.c
> > +++ b/block/blk-rq-qos.c
> > @@ -273,8 +273,6 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data,
> >  		if (data.got_token)
> >  			break;
> >  		if (!has_sleeper && acquire_inflight_cb(rqw, private_data)) {
> > -			finish_wait(&rqw->wait, &data.wq);
> > -
> >  			/*
> >  			 * We raced with wbt_wake_function() getting a token,
> >  			 * which means we now have two. Put our local token
> > -- 
> > 2.25.4  
> 
> Reverting this commit fixed an issue that swapping workloads will stall for
> days without being able to make any progress below.

I have reverted that commit from linux-next today.
Jens Axboe July 15, 2020, 3:32 p.m. UTC | #3
On 7/14/20 8:19 PM, Stephen Rothwell wrote:
> Hi all,
> 
> On Tue, 14 Jul 2020 19:21:24 -0400 Qian Cai <cai@lca.pw> wrote:
>>
>> On Sun, Jun 28, 2020 at 09:56:25AM -0400, Guo Xuenan wrote:
>>> It is no need do finish_wait twice after acquiring inflight.
>>>
>>> Signed-off-by: Guo Xuenan <guoxuenan@huawei.com>
>>> ---
>>>  block/blk-rq-qos.c | 2 --
>>>  1 file changed, 2 deletions(-)
>>>
>>> diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c
>>> index 656460636ad3..18f3eab9f768 100644
>>> --- a/block/blk-rq-qos.c
>>> +++ b/block/blk-rq-qos.c
>>> @@ -273,8 +273,6 @@ void rq_qos_wait(struct rq_wait *rqw, void *private_data,
>>>  		if (data.got_token)
>>>  			break;
>>>  		if (!has_sleeper && acquire_inflight_cb(rqw, private_data)) {
>>> -			finish_wait(&rqw->wait, &data.wq);
>>> -
>>>  			/*
>>>  			 * We raced with wbt_wake_function() getting a token,
>>>  			 * which means we now have two. Put our local token
>>> -- 
>>> 2.25.4  
>>
>> Reverting this commit fixed an issue that swapping workloads will stall for
>> days without being able to make any progress below.
> 
> I have reverted that commit from linux-next today.

Thanks, I'll revert it locally too.
diff mbox series

Patch

diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c
index 656460636ad3..18f3eab9f768 100644
--- a/block/blk-rq-qos.c
+++ b/block/blk-rq-qos.c
@@ -273,8 +273,6 @@  void rq_qos_wait(struct rq_wait *rqw, void *private_data,
 		if (data.got_token)
 			break;
 		if (!has_sleeper && acquire_inflight_cb(rqw, private_data)) {
-			finish_wait(&rqw->wait, &data.wq);
-
 			/*
 			 * We raced with wbt_wake_function() getting a token,
 			 * which means we now have two. Put our local token