Whamcloud - gitweb
LU-10963 gnilnd: stats variables overflow assert 84/32184/4
authorChuck Fossen <chuckf@cray.com>
Thu, 26 Apr 2018 20:04:25 +0000 (15:04 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Jun 2018 03:56:37 +0000 (03:56 +0000)
Reverse bte rdma transactions stats were being
incremented by kgnilnd_admin_addref() which asserts when the value
goes negative. These stats should be incremented with atomic_inc
instead.

Test-Parameters: trivial
Cray-bug-id: LUS-5940
Signed-off-by: Chuck Fossen <chuckf@cray.com>
Change-Id: I06426bc078cc76f14c7b3efb5f3ceb71054c2d09
Reviewed-on: https://review.whamcloud.com/32184
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd_cb.c

index 8afce81..89f8bd2 100644 (file)
@@ -1914,11 +1914,11 @@ kgnilnd_rdma(kgn_tx_t *tx, int type,
 
                        tx->tx_offset = ((__u64)((unsigned long)sink->gnrd_addr)) & 3;
                        if (tx->tx_offset)
-                               kgnilnd_admin_addref(kgnilnd_data.kgn_rev_offset);
+                               atomic_inc(&kgnilnd_data.kgn_rev_offset);
 
                        if ((nob + tx->tx_offset) & 3) {
                                desc_nob = ((nob + tx->tx_offset) + (4 - ((nob + tx->tx_offset) & 3)));
-                               kgnilnd_admin_addref(kgnilnd_data.kgn_rev_length);
+                               atomic_inc(&kgnilnd_data.kgn_rev_length);
                        } else {
                                desc_nob = (nob + tx->tx_offset);
                        }
@@ -1934,7 +1934,7 @@ kgnilnd_rdma(kgn_tx_t *tx, int type,
                                        kgnilnd_tx_done(tx, -EFAULT);
                                        return 0;
                                }
-                               kgnilnd_admin_addref(kgnilnd_data.kgn_rev_copy_buff);
+                               atomic_inc(&kgnilnd_data.kgn_rev_copy_buff);
                                rc = kgnilnd_mem_register(conn->gnc_device->gnd_handle, (__u64)tx->tx_buffer_copy, desc_nob, NULL, GNI_MEM_READWRITE, &tx->tx_buffer_copy_map_key);
                                if (rc != GNI_RC_SUCCESS) {
                                        /* Registration Failed nak rdma and kill the tx. */