From patchwork Fri Jun 27 17:55:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 4436771 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 30D129F319 for ; Fri, 27 Jun 2014 18:05:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FAB6203B5 for ; Fri, 27 Jun 2014 18:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CDF7203B1 for ; Fri, 27 Jun 2014 18:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520AbaF0SE5 (ORCPT ); Fri, 27 Jun 2014 14:04:57 -0400 Received: from prdiron-2.llnl.gov ([128.15.143.172]:42084 "EHLO prdiron-2.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752362AbaF0SEz (ORCPT ); Fri, 27 Jun 2014 14:04:55 -0400 X-Greylist: delayed 574 seconds by postgrey-1.27 at vger.kernel.org; Fri, 27 Jun 2014 14:04:55 EDT X-Attachments: Received: from auk59.llnl.gov (HELO [134.9.93.24]) ([134.9.93.24]) by prdiron-2.llnl.gov with ESMTP; 27 Jun 2014 10:55:20 -0700 Subject: [PATCH 1/3] opensm/osm_perfmgr.c: Remove unnecessary perfmgr log message From: Albert Chu To: linux-rdma@vger.kernel.org Date: Fri, 27 Jun 2014 10:55:19 -0700 Message-Id: <1403891719.30332.419.camel@auk59.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); } }