]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
Optimized locking in SA request send path
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Jul 2005 00:17:08 +0000 (00:17 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Jul 2005 00:17:08 +0000 (00:17 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@44 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/kernel/al_proxy_subnet.c

index 73eddb1ab44db91a45f081e6f934abb7ad4e65a7..df7d86d8745057088a00daf5f3b196171f8777a4 100644 (file)
@@ -258,9 +258,11 @@ proxy_send_sa_req(
                goto proxy_send_sa_req_err1;\r
        }\r
 \r
+       /* Synchronize with callbacks. */\r
+       cl_spinlock_acquire( &p_context->h_al->obj.lock );\r
+\r
        /* Track the request. */\r
-       hdl =\r
-               al_hdl_lock_insert( p_context->h_al, p_sa_req, AL_OBJ_TYPE_H_SA_REQ );\r
+       hdl = al_hdl_insert( p_context->h_al, p_sa_req, AL_OBJ_TYPE_H_SA_REQ );\r
        if( hdl == AL_INVALID_HANDLE )\r
        {\r
                ib_status = IB_INSUFFICIENT_MEMORY;\r
@@ -281,9 +283,6 @@ proxy_send_sa_req(
 \r
        p_ioctl->in.sa_req.p_attr = p_ioctl->in.attr;\r
 \r
-       /* Synchronize with callbacks. */\r
-       cl_spinlock_acquire( &p_context->h_al->obj.lock );\r
-\r
        /*\r
         * We never pass the user-mode flag when sending SA requests - the\r
         * I/O manager will perform all synchronization to make this IRP sync\r