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

Ben Pfaff blp at ovn.org
Thu Jul 15 21:17:24 UTC 2021


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).

Thanks,

Ben.


More information about the dev mailing list