[ovs-dev] [PATCH v2 1/2] Optimize the poll loop for poll_immediate_wake()

Anton Ivanov anton.ivanov at cambridgegreys.com
Thu Jul 15 21:27:05 UTC 2021


On 15/07/2021 22:17, Ben Pfaff wrote:
> On Mon, Jul 12, 2021 at 06:15:28PM +0100, anton.ivanov at cambridgegreys.com wrote:
>> From: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>>
>> If we are not obtaining any useful information out of the poll(),
>> such as is a fd busy or not, we do not need to do a poll() if
>> an immediate_wake() has been requested.
>>
>> This cuts out all the pollfd hash additions, forming the poll
>> arguments and the actual poll() after a call to
>> poll_immediate_wake()
>>
>> Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
> I don't think we need the new 'immediate_wake' member of struct
> poll_loop.  A 'timeout_when' of LLONG_MIN already means the same thing
> (it's even documented in the comment).

OK. Cool.

I did not want to touch any of the timeout logic, so I added a member.

I will send a v3 which uses timeout == zero for this on Monday.

A.

>
> Thanks,
>
> Ben.
>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/



More information about the dev mailing list