The "PM state %d was NOT Suspended???" log message is unnecessary.
It is not an error, and in fact is quite normal, for the sweep_state
to be not suspended.

Multiple threads can enter perfmgr_send_mad() and sit on the
conditional wait.  The first one to be signaled will obtain the
perfmgr lock and set the sweep_state to ACTIVE.  Every other thread
sitting on the conditional wait that is signaled afterwards has a
very high chance of seeing the sweep_state in ACTIVE instead of SUSPENDED.

Signed-off-by: Albert L. Chu <[email protected]>
---
 opensm/osm_perfmgr.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/opensm/osm_perfmgr.c b/opensm/osm_perfmgr.c
index 1c0ed46..2b7ea6a 100644
--- a/opensm/osm_perfmgr.c
+++ b/opensm/osm_perfmgr.c
@@ -448,13 +448,8 @@ wait:
                                goto wait;
 
                        cl_spinlock_acquire(&perfmgr->lock);
-                       if (perfmgr->sweep_state == PERFMGR_SWEEP_SUSPENDED) {
+                       if (perfmgr->sweep_state == PERFMGR_SWEEP_SUSPENDED)
                                perfmgr->sweep_state = PERFMGR_SWEEP_ACTIVE;
-                       } else {
-                               OSM_LOG(perfmgr->log, OSM_LOG_ERROR, "ERR 54FF: 
"
-                                       "PM state %d was NOT Suspended???\n",
-                                       perfmgr->sweep_state);
-                       }
                        cl_spinlock_release(&perfmgr->lock);
                }
        }
-- 
1.7.1



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to