]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "msg/async/rdma: Make poll_blocking() poll for async events in addition to...
authorAmir Vadai <amir@vadai.me>
Tue, 23 May 2017 07:33:36 +0000 (10:33 +0300)
committerAmir Vadai <amir@vadai.me>
Tue, 23 May 2017 14:04:09 +0000 (17:04 +0300)
This reverts commit 2386cea1eb31bec9ec49eafa0135eff82bbe696c.

Change-Id: I93a23f216cd4ce55051b125e9dd7edb3e297aaad
Issue: 995322
Signed-off-by: Amir Vadai <amir@vadai.me>
src/msg/async/rdma/Device.cc
src/msg/async/rdma/RDMAStack.cc

index ee5bbd73fd884cf9c3c1d4aada97f94dbf8466da..392ed7f69c75b882e289ea142d24a6350c45f63b 100644 (file)
@@ -411,10 +411,10 @@ DeviceList::DeviceList(CephContext *cct, Infiniband *ib)
   }
   devices = new Device*[num];
 
-  poll_fds = new struct pollfd[3 * num];
+  poll_fds = new struct pollfd[2 * num];
 
   for (int i = 0; i < num; ++i) {
-    struct pollfd *pfd = &poll_fds[i * 3];
+    struct pollfd *pfd = &poll_fds[i * 2];
     struct Device *d;
 
     d = new Device(cct, ib, device_list[i]);
@@ -427,10 +427,6 @@ DeviceList::DeviceList(CephContext *cct, Infiniband *ib)
     pfd[1].fd = d->rx_cc->get_fd();
     pfd[1].events = POLLIN | POLLERR | POLLNVAL | POLLHUP;
     pfd[1].revents = 0;
-
-    pfd[2].fd = d->ctxt->async_fd;
-    pfd[2].events = POLLIN | POLLERR | POLLNVAL | POLLHUP;
-    pfd[2].revents = 0;
   }
 }
 
@@ -490,7 +486,7 @@ int DeviceList::poll_blocking(bool &done)
 {
   int r = 0;
   while (!done && r == 0) {
-    r = poll(poll_fds, num * 3, 100);
+    r = poll(poll_fds, num * 2, 100);
     if (r < 0) {
       r = -errno;
       lderr(cct) << __func__ << " poll failed " << r << dendl;
@@ -509,8 +505,6 @@ int DeviceList::poll_blocking(bool &done)
 
     if (d->rx_cc->get_cq_event())
       ldout(cct, 20) << __func__ << " " << *d << ": got rx cq event" << dendl;
-
-    d->handle_async_event();
   }
 
   return r;
index 3413f34015739dc0e4fb70a31faadb6096dbb1d0..03d7c1f1c3e2b851d660bc5e69f029f3411826c4 100644 (file)
@@ -210,6 +210,7 @@ void RDMADispatcher::polling()
         break;
 
       if ((ceph_clock_now() - last_inactive).to_nsec() / 1000 > cct->_conf->ms_async_rdma_polling_us) {
+        global_infiniband->handle_async_event();
         if (!rearmed) {
           // Clean up cq events after rearm notify ensure no new incoming event
           // arrived between polling and rearm