]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg: remove duplicated code - local_delivery will now call 'enqueue' 7948/head
authorAvner BenHanoch <avnerb@mellanox.com>
Sun, 6 Mar 2016 09:00:28 +0000 (11:00 +0200)
committerAvner BenHanoch <avnerb@mellanox.com>
Sun, 6 Mar 2016 09:00:28 +0000 (11:00 +0200)
This simplify the code and clarify that for each local message,
 'local_delivery_thread' simply tries to 'fast_dispatch' it,
 or it will 'enqueue' it for the dispatch_thread (like any standard message)

Signed-off-by: Avner BenHanoch <avnerb@mellanox.com>
src/msg/simple/DispatchQueue.cc

index 6f7495ef520151d31e48a04e48ba338429bf40c1..fed198e49849780b3333f3af0ba9eee5771b72d7 100644 (file)
@@ -123,16 +123,7 @@ void DispatchQueue::run_local_delivery()
     if (can_fast_dispatch(m)) {
       fast_dispatch(m);
     } else {
-      Mutex::Locker l(lock);
-      add_arrival(m);
-      if (priority >= CEPH_MSG_PRIO_LOW) {
-        mqueue.enqueue_strict(
-            0, priority, QueueItem(m));
-      } else {
-        mqueue.enqueue(
-            0, priority, m->get_cost(), QueueItem(m));
-      }
-      cond.Signal();
+      enqueue(m, priority, 0);
     }
     local_delivery_lock.Lock();
   }