[PATCH 0/2] Improve waiting for network connectivity

Martin Kolman mkolman at redhat.com
Tue Jul 9 15:36:36 UTC 2013


The first patch reworks how the network module waits for network connectivity to become available.
It converts the old busy waiting method to an internal one, which is called only once from a thread
run on startup. There is a new wait_for_connectivity() method for usage by other modules,
that waits for the internal method to finish (based on the Condition wait/notify construct, recently
used in the wait-for-geolocation patch).

This results in only one busy waiting happening at once. The busy waiting period has also been shortened from
1 second to 100 milliseconds, to shave off some unnecessary waiting time for Geolocation and VNC
startup (so that if network becomes available in say 1.1 seconds, anaconda does not wait full 2 seconds).
As there is only one busy waiting for connectivity happening at once, this should not be an issue.

The second patch converts other modules to use the new waiting method.

BTW, please note that in some cases, like  when using wired internet connectivity,
no waiting actually takes place as the network is already initialized by Dracut when Anaconda takes over.


Martin Kolman (2):
  Improve waiting for network connectivity
  Use the new wait for connectivity function

 pyanaconda/geoloc.py  | 15 ++--------
 pyanaconda/network.py | 82 ++++++++++++++++++++++++++++++++++++---------------
 pyanaconda/vnc.py     |  2 +-
 3 files changed, 61 insertions(+), 38 deletions(-)

-- 
1.8.3.1



More information about the anaconda-patches mailing list