From owner-freebsd-net@FreeBSD.ORG Mon Apr 8 17:30:13 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C78D28A1 for ; Mon, 8 Apr 2013 17:30:13 +0000 (UTC) (envelope-from VenkatKumar.Duvvuru@Emulex.Com) Received: from CMEXEDGE1.ext.emulex.com (cmexedge1.ext.emulex.com [138.239.224.99]) by mx1.freebsd.org (Postfix) with ESMTP id 914F2CD0 for ; Mon, 8 Apr 2013 17:30:13 +0000 (UTC) Received: from CMEXHTCAS2.ad.emulex.com (138.239.115.218) by CMEXEDGE1.ext.emulex.com (138.239.224.99) with Microsoft SMTP Server (TLS) id 14.2.318.4; Mon, 8 Apr 2013 10:15:36 -0700 Received: from CMEXMB1.ad.emulex.com ([169.254.1.136]) by CMEXHTCAS2.ad.emulex.com ([2002:8aef:71b8::8aef:71b8]) with mapi id 14.02.0318.004; Mon, 8 Apr 2013 10:14:58 -0700 From: "Duvvuru,Venkat Kumar" To: "freebsd-net@freebsd.org" Subject: drbr_enqueue - OCE driver - Freebsd 9.1 Thread-Topic: drbr_enqueue - OCE driver - Freebsd 9.1 Thread-Index: Ac40fItUT8/z+mHWRfWrn38wP/SoOw== Date: Mon, 8 Apr 2013 17:14:59 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.226.252.152] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 17:30:13 -0000 Hi, In the transmit path, if enqueue mechanism is used instead of blocking on t= he lock, the throughput is not good in some scenarios (especially single qu= eue, multiple connections). For example: if (TRY_LOCK(&wq->tx_lock)) { status =3D oce_multiq_transmit(ifp, m, wq); UNLOCK(&wq->tx_lock); } else { status =3D drbr_enqueue(ifp, wq->br, m); } Instead of the above code where the request is enqueued if I use a normal L= OCK and block on it, it is giving good performance. Any suggestions on why the throughput is low in case of enqueue mechanism. Thx, Venkat.