From 82cac388749c49c384bcc7fbbe34077b6bbed553 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 10 Jul 2011 12:59:32 +1000 Subject: [PATCH] Logic failure meant the longpoll fake staged were never removed. This would lead to idle periods and may have even caused complete idle failures. --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d60f65f7..2a4124c3 100644 --- a/main.c +++ b/main.c @@ -762,9 +762,10 @@ static bool workio_submit_work(struct workio_cmd *wc) static void inc_staged(int inc, bool lp) { pthread_mutex_lock(&stgd_lock); - total_staged += inc; if (lp) lp_staged += inc; + else + total_staged += inc; pthread_mutex_unlock(&stgd_lock); } @@ -782,7 +783,7 @@ static int requests_staged(void) int ret; pthread_mutex_lock(&stgd_lock); - ret = total_staged; + ret = total_staged + lp_staged; pthread_mutex_unlock(&stgd_lock); return ret; }