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/trunk@44 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/kernel/al_proxy_subnet.c

index 73eddb1..df7d86d 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