[openib-general] OpenSM/osm_sa_mcmember_record.c: In __osm_mcmr_rcv_leave_mgrp, eliminate unneeded lock acquisition

Eitan Zahavi eitan at mellanox.co.il
Sat Dec 2 08:13:27 PST 2006


Hal Rosenstock wrote:
> Hi Eitan,
>
> On Sat, 2006-12-02 at 10:51, Eitan Zahavi wrote:
>   
>> Hi Hal,
>>
>> I see you are doing some work on optimizing the locking scheme in the 
>> multicast registration flow
>>  (join and leave).
>>     
>
> Yes and it goes further than this. Additional patch(es) will be coming.
>
> So does this look OK to you ?
>
>   
I hope Yevgeny will be able to review the entire flow next week.
>> What kind of testing do you do?
>>     
>
> Two fold:
> 1. Tested in another simulated environment
> 2. Tested in a large cluster where there is a larger join/leave race
> issue which started us down the road looking at these code paths more
>
>   
>> In the simulated environment we do not have currently a test that will 
>> fire pairs of join/leave or
>> join/leave/join and verify correctness.Maybe we should have one written.
>>     
>
> Sure; you are welcome to add one. I don't have time to do this now.
>   
I will try and get to that next week. I will let you know when it is 
available.
> -- Hal
>
>   
>> Eitan
>>
>> Hal Rosenstock wrote:
>>     
>>> OpenSM/osm_sa_mcmember_record.c: In __osm_mcmr_rcv_leave_mgrp, eliminate
>>> unneeded lock acquisition
>>>
>>> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
>>> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
>>>
>>> diff --git a/osm/opensm/osm_sa_mcmember_record.c b/osm/opensm/osm_sa_mcmember_record.c
>>> index f7f879b..d6c6968 100644
>>> --- a/osm/opensm/osm_sa_mcmember_record.c
>>> +++ b/osm/opensm/osm_sa_mcmember_record.c
>>> @@ -1459,6 +1459,8 @@ __osm_mcmr_rcv_leave_mgrp(
>>>            new_join_state | (p_mcm_port->scope_state & 0xf0);
>>>  
>>>          mcmember_rec.scope_state = p_mcm_port->scope_state;
>>> +
>>> +        CL_PLOCK_RELEASE( p_rcv->p_lock );
>>>        }
>>>        else
>>>        {
>>> @@ -1475,10 +1477,6 @@ __osm_mcmr_rcv_leave_mgrp(
>>>                     "__osm_mcmr_rcv_leave_mgrp: ERR 1B09: "
>>>                     "osm_sm_mcgrp_leave failed\n" );
>>>          }
>>> -
>>> -        CL_PLOCK_EXCL_ACQUIRE(p_rcv->p_lock);
>>> -        /* Note: The deletion of the mgrp itself will be done in the callback
>>> -           for the multicast tree updating (osm_mcast_mgr_process_mgrp_cb) */
>>>        }
>>>      }
>>>      else
>>> @@ -1511,8 +1509,6 @@ __osm_mcmr_rcv_leave_mgrp(
>>>      goto Exit;
>>>    }
>>>  
>>> -  CL_PLOCK_RELEASE( p_rcv->p_lock );
>>> -
>>>    /* Send an SA response */
>>>    __osm_mcmr_rcv_respond( p_rcv, p_madw, &mcmember_rec );
>>>  
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> openib-general mailing list
>>> openib-general at openib.org
>>> http://openib.org/mailman/listinfo/openib-general
>>>
>>> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>>>   
>>>       
>
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>   





More information about the general mailing list