From f2f0ba80242b57027316b141a847710daca805a3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 24 Aug 2011 23:34:22 +1000 Subject: [PATCH] Revert "Revert "Since we roll work all the time now, we end up staging a lot of work without queueing, so don't queue if we've already got staged work."" This reverts commit cea1cf6cc0c5100ac332801d9fd596435f27aea7. This wasn't eht cause of the false positives. --- main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.c b/main.c index 779a2156..50790f34 100644 --- a/main.c +++ b/main.c @@ -2945,6 +2945,9 @@ static bool queue_request(struct thr_info *thr, bool needed) if (rq >= maxq || rs >= maxq) return true; + if (rs > rq) + goto out; + /* fill out work request message */ wc = calloc(1, sizeof(*wc)); if (unlikely(!wc)) { @@ -2973,6 +2976,7 @@ static bool queue_request(struct thr_info *thr, bool needed) workio_cmd_free(wc); return false; } +out: inc_queued(); return true; }