From 1f3130d5f91951f84ccb985ca66c2c6cb6816984 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 5 Feb 2014 17:40:59 -0500 Subject: [PATCH 1/1] Fix: don't sleep(1) on the consumer ready flag 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 --- src/bin/lttng-consumerd/lttng-consumerd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index d9ec0f33e..e226ebc69 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -426,7 +426,7 @@ int main(int argc, char **argv) * sessiond thread reply to the sessiond that we are ready. */ while (uatomic_read(<tng_consumer_ready)) { - sleep(1); + usleep(100000); } cmm_smp_mb(); /* Read ready before following operations */ -- 2.34.1