[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 07:51:53 PST 2006
Hi Hal,
I see you are doing some work on optimizing the locking scheme in the
multicast registration flow
(join and leave).
What kind of testing do you do?
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.
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
>
More information about the general
mailing list