coreos/flannel — pull request #86 by vcaputo (2014-11-22 05:45:56+00:00)
Title: backend/udp: If either tun or udp get read optimistically repeat

This optimization bypasses poll() under continuous activity like
bulk transfers. In simple dd | ncat tests this change eliminated
practically all poll() calls during the transfer, substituting them
with EAGAIN read()/recvfrom() calls at half the original poll()
occurrences.

The ctl fd is intentionally starved by this change, and an upper
bound could be placed on how long we do so by adding a simple
counter to break the inner loop if necessary.