[ovs-dev] [PATCH 4/5] pool-loop: Enable checking whether a FD caused a wakeup.

Ben Pfaff blp at nicira.com
Thu Sep 22 19:48:51 UTC 2011


On Mon, Sep 19, 2011 at 03:00:07PM -0700, Jesse Gross wrote:
> Each time we run through the poll loop, we check all file descriptors
> that we were waiting on to see if there is data available.  However,
> this requires a system call and poll already provides information on
> which FDs caused the wakeup so it is inefficient as the number of
> active FDs grows.  This provides a way to check whether a given FD
> has data.

s/pool/poll/ in subject.

I'm nervous about using linear search here, since we'll be growing the
number of fds significantly.

I think that poll_fd_woke() is inadequate in the case where a single
fd has been inserted by multiple calls to poll_fd_wait().  It should
presumably check for all instances and "or" their revents together.



More information about the dev mailing list