From owner-freebsd-net@FreeBSD.ORG Mon Apr 8 19:15:33 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DB51EBE1 for ; Mon, 8 Apr 2013 19:15:33 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id AD14327A for ; Mon, 8 Apr 2013 19:15:33 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n12so6516775oag.41 for ; Mon, 08 Apr 2013 12:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=gOggC9pZWx947QPLTKAV4+9lbxa6HHBaP/yH1WQRhU0=; b=KchV9KXleIPUHjxRtqGl85fkzrjDSXlZ+g6L/9l7vFnfGPO3p4l62i0znUMp2IVF1l 6XjgWLbldN9W1Yw4ABNjHOs1Ruq3dDQVAyWRMNgfgBKd7DlhHxSUZOWfV5kKj33TTqEy r5/QMKrMCwrLgsYPBAlLObcqD8zARACNe9QAN5bU+XGyA7//1/RtX8pLv2JXNOz7olO3 dN+cbi+TIMkbkndL0fHCxnqoOk3xcasUgdEE2p0LOTANh6bjOYp03dFxFXIuOU+ImS6N hT0ZGBAzy+/uoKxN6Xyku8wttBTAcytmtvaOG1wX8kJi2G6kx6cSyCB4pZhuma7uMarn aqGA== MIME-Version: 1.0 X-Received: by 10.182.166.10 with SMTP id zc10mr8689842obb.80.1365448532937; Mon, 08 Apr 2013 12:15:32 -0700 (PDT) Received: by 10.76.109.236 with HTTP; Mon, 8 Apr 2013 12:15:32 -0700 (PDT) In-Reply-To: References: Date: Mon, 8 Apr 2013 15:15:32 -0400 Message-ID: Subject: Re: drbr_enqueue - OCE driver - Freebsd 9.1 From: Ryan Stone To: "Duvvuru,Venkat Kumar" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" 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 19:15:33 -0000 On Mon, Apr 8, 2013 at 1:14 PM, Duvvuru,Venkat Kumar < VenkatKumar.Duvvuru@emulex.com> wrote: > Hi, > In the transmit path, if enqueue mechanism is used instead of blocking on > the lock, the throughput is not good in some scenarios (especially single > queue, multiple connections). > For example: > if (TRY_LOCK(&wq->tx_lock)) { > status = oce_multiq_transmit(ifp, m, wq); > UNLOCK(&wq->tx_lock); > } else { > status = drbr_enqueue(ifp, wq->br, m); > } > > Instead of the above code where the request is enqueued if I use a normal > LOCK and block on it, it is giving good performance. > > Any suggestions on why the throughput is low in case of enqueue mechanism. > > Thx, > Venkat. > Shouldn't you be triggering a taskqueue to actually transmit the packet in the "failed to acquire lock" case? Otherwise it could be held in the drbr indefinitely.