On Thu, Sep 22, 2011 at 01:58:49PM -0700, Jesse Gross wrote: > On Thu, Sep 22, 2011 at 12:48 PM, Ben Pfaff <b...@nicira.com> wrote: > > 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. > > > I'm nervous about using linear search here, since we'll be growing the > > number of fds significantly. > > I thought about this before but the problem is that you trade off the > cost of the doing a single lookup for increased cost in building > whatever data structure you use to get better than linear performance. > In this case we actually rebuild it quite frequently (each trip > through the poll loop) so it wasn't clear to me that it was a good > tradeoff. I can think of some ways to optimize this (for one thing, > we probably have the same set of FDs the vast majority of the time) > but I didn't want to go too far down that path without data as it > whether it's a real problem.
I'm OK with it for now. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev