about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--ioq.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/ioq.c b/ioq.c
index 78a9ba7..f7af1ab 100644
--- a/ioq.c
+++ b/ioq.c
@@ -91,13 +91,7 @@ bool mog_ioq_ready(struct mog_ioq *ioq, struct mog_fd *mfd)
 
         good = ioq->cur > 0;
         if (good) {
-                /*
-                 * assume the worst when we are the last one to
-                 * acquire a free slot
-                 */
-                if (--ioq->cur == 0)
-                        ioq_set_contended(ioq);
-
+                --ioq->cur;
                 mog_ioq_current = ioq;
         } else {
                 TRACE(CMOGSTORED_IOQ_BLOCKED(mfd->fd));
@@ -131,13 +125,8 @@ void mog_ioq_next(struct mog_ioq *check_ioq)
         if (mog_ioq_current->cur <= mog_ioq_current->max) {
                 /* wake up any waiters */
                 mfd = SIMPLEQ_FIRST(&mog_ioq_current->ioq_head);
-                if (mfd) {
+                if (mfd)
                         SIMPLEQ_REMOVE_HEAD(&mog_ioq_current->ioq_head, ioqent);
-
-                        /* if there's another head, we're still contended */
-                        if (SIMPLEQ_FIRST(&mog_ioq_current->ioq_head))
-                                ioq_set_contended(mog_ioq_current);
-                }
         } else {
                 /* mog_ioq_adjust was called and lowered our capacity */
                 mog_ioq_current->cur--;