]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/rdma: set correct value to memory manager 12299/head
authorAdir Lev <adirl@mellanox.com>
Sun, 4 Dec 2016 11:30:12 +0000 (11:30 +0000)
committerAdir Lev <adirl@mellanox.com>
Sun, 4 Dec 2016 13:38:31 +0000 (15:38 +0200)
set the correct max_send_wr and max_recv_wr
print log messages accordingly

Change-Id: I97a562bc994f14b87724fcf84baca4cdbf0f8e0d
Signed-off-by: Adir Lev <adirl@mellanox.com>
src/msg/async/rdma/Infiniband.cc

index 968ff9d90d1e4a39c79a9f76cd897a0ece2d3769..14a13cb0602f8f1693be3f1a8f4f479a5a919915 100644 (file)
@@ -76,13 +76,18 @@ Infiniband::Infiniband(CephContext *cct, const std::string &device_name, uint8_t
 \r
   max_recv_wr = device->device_attr->max_srq_wr;\r
   if (max_recv_wr > cct->_conf->ms_async_rdma_receive_buffers) {\r
-    ldout(cct, 0) << __func__ << " max allowed receive buffers is " << max_recv_wr << " use this instead." << dendl;\r
     max_recv_wr = cct->_conf->ms_async_rdma_receive_buffers;\r
+    ldout(cct, 0) << __func__ << " assigning: " << max_recv_wr << " receive buffers" << dendl;\r
+  } else {\r
+    ldout(cct, 0) << __func__ << " using the max allowed receive buffers: " << max_recv_wr << dendl;\r
   }\r
+\r
   max_send_wr = device->device_attr->max_qp_wr;\r
   if (max_send_wr > cct->_conf->ms_async_rdma_send_buffers) {\r
-    ldout(cct, 0) << __func__ << " max allowed send buffers is " << max_send_wr << " use this instead." << dendl;\r
     max_send_wr = cct->_conf->ms_async_rdma_send_buffers;\r
+    ldout(cct, 0) << __func__ << " assigning: " << max_send_wr << " send buffers"  << dendl;\r
+  } else {\r
+    ldout(cct, 0) << __func__ << " using the max allowed send buffers: " << max_send_wr << dendl;\r
   }\r
 \r
   ldout(cct, 1) << __func__ << " device allow " << device->device_attr->max_cqe\r
@@ -91,9 +96,7 @@ Infiniband::Infiniband(CephContext *cct, const std::string &device_name, uint8_t
   memory_manager = new MemoryManager(device, pd,\r
                                      cct->_conf->ms_async_rdma_enable_hugepage);\r
   memory_manager->register_rx_tx(\r
-      cct->_conf->ms_async_rdma_buffer_size,\r
-      cct->_conf->ms_async_rdma_receive_buffers,\r
-      cct->_conf->ms_async_rdma_send_buffers);\r
+      cct->_conf->ms_async_rdma_buffer_size, max_recv_wr, max_send_wr);\r
 \r
   srq = create_shared_receive_queue(max_recv_wr, MAX_SHARED_RX_SGE_COUNT);\r
   post_channel_cluster();\r
@@ -157,6 +160,8 @@ int Infiniband::QueuePair::init()
   qp = ibv_create_qp(pd, &qpia);\r
   if (qp == NULL) {\r
     lderr(cct) << __func__ << " failed to create queue pair" << cpp_strerror(errno) << dendl;\r
+    lderr(cct) << __func__ << " try reducing ms_async_rdma_receive_buffers or"\r
+       " ms_async_rdma_send_buffers" << dendl;\r
     return -1;\r
   }\r
 \r