Skip to content
  • Joe Stringer's avatar
    netdev: Globally track port status changes · da4a6191
    Joe Stringer authored
    
    
    Previously, we tracked status changes for ofports on a per-device basis.
    Each time in the main thread's loop, we would inspect every ofport
    to determine whether the status had changed for corresponding devices.
    
    This patch replaces the per-netdev change_seq with a global 'struct seq'
    which tracks status change for all ports. In the average case where
    ports are not constantly going up or down, this allows us to check the
    sequence once per main loop and not poll any ports. In the worst case,
    execution is expected to be similar to how it is currently.
    
    In a test environment of 5000 internal ports and 50 tunnel ports with
    bfd, this reduces average CPU usage of the main thread from about 40% to
    about 35%.
    
    Signed-off-by: default avatarJoe Stringer <joestringer@nicira.com>
    Signed-off-by: default avatarEthan Jackson <ethan@nicira.com>
    Acked-by: default avatarEthan Jackson <ethan@nicira.com>
    da4a6191