Skip to content
  • David Johnson's avatar
    Improve docker clientside net setup: hold global lock less. · 1f5ff983
    David Johnson authored
    Prior to this commit, I had reused all the libvnode:: network functions,
    but that requires these system-wide indexes to be built (i.e. bridges,
    ifaces) before using the helpers -- and on any network state change.
    Those indexing functions take a long time on heavily-loaded systems
    (i.e., 5k processes, hundreds of ifaces).  The helpers become very fast;
    but for the case of large numbers of vnodes on one vhost, it is better
    to hold the global lock for less time, and pay a higher per-helper cost,
    instead of making use of a nicely-indexed cache.
    
    So now we cache nothing and (hopefully) use /sys intelligently to avoid
    forking unnecessarily.
    1f5ff983