]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
speed container creation/destruction
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 31 Mar 2009 11:55:44 +0000 (13:55 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 31 Mar 2009 11:55:44 +0000 (13:55 +0200)
As the state of the container is monitored with the netlink,
the file state is no longer used to watch the state changes.

The previous hack, which adds a tempo of 200ms, is removed and
that makes the container being created, started, stopped, destroyed
faster, we gain 1 second in a container lifecycle. One second is
too much if we launch thousand of containers, one by one like for
example in a tests suite.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/state.c

index e542230ea5cf8a87c254b090d6a89e4d4a08dc7f..a97fdea21ebe63b5065384602153106c2eeffa6b 100644 (file)
@@ -93,13 +93,6 @@ out:
 
        lxc_monitor_send_state(name, state);
 
-       /* let the event to be propagated, crappy but that works,
-        * otherwise the events will be folded into only one event,
-        * and I want to have them to be one by one in order
-        * to follow the different states of the container.
-        */
-       usleep(200000);
-
        return -err;
 }