Re: [PATCH v2] io_uring: reduce latency by reissueing the operation

From: Jens Axboe
Date: Mon Jun 21 2021 - 12:03:29 EST


On 6/20/21 1:28 PM, Olivier Langlois wrote:
> On Sun, 2021-06-20 at 12:07 -0700, Randy Dunlap wrote:
>> On 6/20/21 12:05 PM, Olivier Langlois wrote:
>>> - return false;
>>> + return ret?IO_ARM_POLL_READY:IO_ARM_POLL_ERR;
>>
>> Hi,
>> Please make that return expression more readable.
>>
>>
> How exactly?
>
> by adding spaces?
> Changing the define names??

Not super important, but I greatly prefer:

if (ret)
return IO_ARM_POLL_READY;
return IO_ARM_POLL_ERR;

as that's a lot more readable to me. This is orthogonal to the currently
missing spaces, of course.

For the defines, an enum would be preferable too. And place it near where
it's used.

--
Jens Axboe