From patchwork Tue Jun 1 15:32:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 103570 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o51FVqrJ003912 for ; Tue, 1 Jun 2010 15:31:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756577Ab0FAPbv (ORCPT ); Tue, 1 Jun 2010 11:31:51 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:63077 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756466Ab0FAPbt (ORCPT ); Tue, 1 Jun 2010 11:31:49 -0400 Received: by fxm8 with SMTP id 8so1064876fxm.19 for ; Tue, 01 Jun 2010 08:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=y0S7xKly9MfMT5mGmDBmBshKgnlpbDNy8hCpzKsysCY=; b=YKAj9dx+OeP4yMdHD+Of7UVe7O329lD0EMrZwR3vsgd16Y2QZF4t94u2fAP8a4gLsE afdeMvh69nr4nX6YnQmFiYB1bLdc5Wehe5dp0UGkKLmrj3mb2sUlxLfflJCryV1XlWiY MxtfwloxdBxu9u0xEOhnT50JbwaQ1BDqs3lTY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=izUxG7el8piJrUgz0uruqFhPWFrWxefXVqkvWRa7nE0Nq5JR7sr8jS9bl3sJDnmKWX KP4W3K+22h+QVfrZg878/xXgwkul64/31y59DO4umqxfP8yjVOnmbKnyj3cei5cVHAKn 7J8uUQnfp7TRvrGcGK+QTbKLdgrxpljp3SzMw= Received: by 10.223.101.81 with SMTP id b17mr7255267fao.17.1275406306625; Tue, 01 Jun 2010 08:31:46 -0700 (PDT) Received: from me.localdomain (87.69.36.170.cable.012.net.il [87.69.36.170]) by mx.google.com with ESMTPS id y12sm47592999faj.17.2010.06.01.08.31.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Jun 2010 08:31:44 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 73A8311DF7; Tue, 1 Jun 2010 18:32:34 +0300 (IDT) Date: Tue, 1 Jun 2010 18:32:34 +0300 From: Sasha Khapyorsky To: Hal Rosenstock Cc: linux-rdma@vger.kernel.org, Yevgeny Kliteynik Subject: Re: [PATCH] opensm: Add a rate based mechanism for SMP transactions Message-ID: <20100601153234.GR28549@me> References: <20091216151115.GA22639@comcast.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091216151115.GA22639@comcast.net> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 15:31:52 +0000 (UTC) diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c index ff9e4db..a16d88e 100644 --- a/opensm/opensm/osm_vl15intf.c +++ b/opensm/opensm/osm_vl15intf.c @@ -113,6 +113,8 @@ static void vl15_poller(IN void *p_ptr) osm_madw_t *p_madw; osm_vl15_t *p_vl = p_ptr; cl_qlist_t *p_fifo; + int32_t max_smps = p_vl->max_wire_smps; + int32_t max_wire_smps2 = 2 * max_smps; /* FIXME: make configurable */ OSM_LOG_ENTER(p_vl->p_log); @@ -156,16 +158,21 @@ static void vl15_poller(IN void *p_ptr) EVENT_NO_TIMEOUT, TRUE); while (p_vl->p_stats->qp0_mads_outstanding_on_wire >= - (int32_t) p_vl->max_wire_smps && + max_smps && p_vl->thread_state == OSM_THREAD_STATE_RUN) { status = cl_event_wait_on(&p_vl->signal, EVENT_NO_TIMEOUT, TRUE); - if (status != CL_SUCCESS) { + if (status == CL_TIMEOUT && + max_smps < max_wire_smps2) { + max_smps++; + break; + } else if (status != CL_SUCCESS) { OSM_LOG(p_vl->p_log, OSM_LOG_ERROR, "ERR 3E02: " "Event wait failed (%s)\n", CL_STATUS_MSG(status)); break; } + max_smps = p_vl->max_wire_smps; } }