Fix: don't sleep(1) on the consumer ready flag
authorDavid Goulet <dgoulet@efficios.com>
Wed, 5 Feb 2014 22:40:59 +0000 (17:40 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 10 Feb 2014 19:55:18 +0000 (14:55 -0500)
This is way too long on especially when the first command that spawn the
consumer as to wait a full second on powerful system.

Bring this down to 0.1 sec sleep by using usleep().

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c

index d9ec0f33efc4cbb0453f91ba479db9e550bd8ed8..e226ebc69e973eb34faa74d7a1be56ab7c3ab090 100644 (file)
@@ -426,7 +426,7 @@ int main(int argc, char **argv)
         * sessiond thread reply to the sessiond that we are ready.
         */
        while (uatomic_read(&lttng_consumer_ready)) {
-               sleep(1);
+               usleep(100000);
        }
        cmm_smp_mb();   /* Read ready before following operations */
 
This page took 0.028898 seconds and 4 git commands to generate.