On Thu, Nov 14, 2013 at 03:28:25PM -0800, Joe Stringer wrote:
> Previously, we tracked status changes for ofports on a per-device basis.
> Each time in the main thread's loop, we would loop through all ofports
> and manually check whether the status has changed for corresponding
> devices.
> 
> This patch shifts change_seq above the netdevice layer, with one atomic
> variable tracking status change for all ports. In the average case where
> ports are not constantly going up or down, this allows us to check
> change_seq once per loop and not poll any ports. In the worst case,
> execution is expected to be similar to how it is currently.
> 
> As change_seq is no longer tracked per-device, it doesn't make sense to
> cache this status in each ofport struct. As such, we shift this into the
> ofproto struct.
> 
> In a test environment of 5000 internal ports and 50 tunnel ports with
> bfd, this reduces CPU usage from about 45% to about 35%.
> 
> Signed-off-by: Joe Stringer <joestrin...@nicira.com>

I think we could delete netdev_dummy_changed() and
netdev_vport_changed() entirely and just call netdev_notify() from the
caller.

I think that every netdev construct function now calls netdev_notify().
If so, I guess we could call it centrally from netdev_open().

I'd expect that bond_wait() should use netdev_seq_wait() instead of
a direct comparison followed by poll_immediate_wake().

In the new comment here:
+ * although implementations should try to avoid this. netdev.c contains more
+ * information about this notification interface. */
I'd be more specific about where to look, naming the related functions.

Otherwise this looks good, thanks.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to