Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403811
| From | Wenwei Tao <ww.tao0320@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] lightnvm: break the loop when rqd is not null |
| Date | 2016-05-19 17:20 +0200 |
| Message-ID | <rAxTY-1sm-25@gated-at.bofh.it> (permalink) |
| References | <rApMK-4Bp-3@gated-at.bofh.it> <rAvyO-8iS-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
That is okay with me.
2016-05-19 20:40 GMT+08:00 Matias Bjørling <mb@lightnvm.io>:
> On 05/19/2016 08:38 AM, Wenwei Tao wrote:
>>
>> From: Wenwei Tao <ww.tao0320@gmail.com>
>>
>> Break the loop when rqd is not null to reduce
>> unnecessary schedule.
>>
>> Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
>> ---
>> drivers/lightnvm/rrpc.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
>> index 2103e97..2915e39 100644
>> --- a/drivers/lightnvm/rrpc.c
>> +++ b/drivers/lightnvm/rrpc.c
>> @@ -98,6 +98,9 @@ static void rrpc_discard(struct rrpc *rrpc, struct bio
>> *bio)
>>
>> do {
>> rqd = rrpc_inflight_laddr_acquire(rrpc, slba, len);
>> + if (rqd)
>> + break;
>> +
>> schedule();
>> } while (!rqd);
>>
>>
>
> If that case, mind if I convert the do..while to while?
>
> while(1) {
> rqd = rrpc_inflight_laddr_acquire(rrpc, slba, len);
> if (rqd)
> break;
> schedule();
> }
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] lightnvm: break the loop when rqd is not null Wenwei Tao <wwtao0320@163.com> - 2016-05-19 08:40 +0200
[PATCH 2/2] lightnvm: hold nvm_lock until finish the target creation Wenwei Tao <wwtao0320@163.com> - 2016-05-19 08:40 +0200
Re: [PATCH 2/2] lightnvm: hold nvm_lock until finish the target creation Matias Bjørling <mb@lightnvm.io> - 2016-05-19 14:50 +0200
Re: [PATCH 2/2] lightnvm: hold nvm_lock until finish the target creation Wenwei Tao <ww.tao0320@gmail.com> - 2016-05-19 17:20 +0200
Re: [PATCH 1/2] lightnvm: break the loop when rqd is not null Matias Bjørling <mb@lightnvm.io> - 2016-05-19 14:50 +0200
Re: [PATCH 1/2] lightnvm: break the loop when rqd is not null Wenwei Tao <ww.tao0320@gmail.com> - 2016-05-19 17:20 +0200
csiph-web