lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 May 2016 23:17:52 +0800
From:	Wenwei Tao <ww.tao0320@...il.com>
To:	Matias Bjørling <mb@...htnvm.io>
Cc:	Wenwei Tao <wwtao0320@....com>, linux-kernel@...r.kernel.org,
	linux-block@...r.kernel.org
Subject: Re: [PATCH 1/2] lightnvm: break the loop when rqd is not null

That is okay with me.

2016-05-19 20:40 GMT+08:00 Matias Bjørling <mb@...htnvm.io>:
> On 05/19/2016 08:38 AM, Wenwei Tao wrote:
>>
>> From: Wenwei Tao <ww.tao0320@...il.com>
>>
>> Break the loop when rqd is not null to reduce
>> unnecessary schedule.
>>
>> Signed-off-by: Wenwei Tao <ww.tao0320@...il.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();
> }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ