ofproto-dpif-monitor: Use heap to order the mport wakeup time.
Before this commit, each time ofproto-dpif-monitor thread wakes up,
all monitored ports will be iterated over. This adds a huge overhead
to the monitor thread. This commit uses a heap to order the wakeup
time of monitored ports. So each time the monitor thread is waken up,
it will only iterate those monitored ports that have timed out.
This commit greatly increases the number of monitored interfaces
openvswitch could support.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>