[ofa-general] [PATCH 1/3] opensm/perfmgr: wakeup perfmgr discover only after NO_PENDING_TRANSACTION was signaled

Sasha Khapyorsky sashak at voltaire.com
Sun Jan 27 16:11:58 PST 2008


This fix potential race between perfmgr discovery wakeup and
NO_PENDING_TRANSACTION delivery, when this signal could remain not
cleared, which will cause to some error messages.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/osm_sm_mad_ctrl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opensm/opensm/osm_sm_mad_ctrl.c b/opensm/opensm/osm_sm_mad_ctrl.c
index 762b684..5981ca3 100644
--- a/opensm/opensm/osm_sm_mad_ctrl.c
+++ b/opensm/opensm/osm_sm_mad_ctrl.c
@@ -106,11 +106,11 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 			"__osm_sm_mad_ctrl_retire_trans_mad: "
 			"signal OSM_SIGNAL_NO_PENDING_TRANSACTIONS\n");
 
+		osm_sm_signal(&p_ctrl->p_subn->p_osm->sm,
+			      OSM_SIGNAL_NO_PENDING_TRANSACTIONS);
 #ifdef ENABLE_OSM_PERF_MGR
 		pthread_cond_signal(&p_ctrl->p_stats->cond);
 #endif
-		osm_sm_signal(&p_ctrl->p_subn->p_osm->sm,
-			      OSM_SIGNAL_NO_PENDING_TRANSACTIONS);
 	}
 
 	OSM_LOG_EXIT(p_ctrl->p_log);
-- 
1.5.4.rc5




More information about the general mailing list