From df8178078e1edef5bcdf650547fc70be7936f33a Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 29 Aug 2013 10:38:12 -0400 Subject: [PATCH] Fix: remove bad check after epoll wait in consumer The returned nb_fd value is the number of FD ready for the requested I/O so having and revents set to 0 is possible since not all fd are ready thus making this check irrelevant and actually ressource consuming. Signed-off-by: David Goulet --- src/common/consumer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/common/consumer.c b/src/common/consumer.c index 7acb8560c..da24f81c5 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2197,11 +2197,6 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); - /* Just don't waste time if no returned events for the fd */ - if (!revents) { - continue; - } - if (pollfd == lttng_pipe_get_readfd(ctx->consumer_metadata_pipe)) { if (revents & (LPOLLERR | LPOLLHUP )) { DBG("Metadata thread pipe hung up"); -- 2.34.1