From owner-freebsd-net@FreeBSD.ORG Tue Apr 16 11:44:16 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 846307A4; Tue, 16 Apr 2013 11:44:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3363EE; Tue, 16 Apr 2013 11:44:15 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail28.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3GBi64Q019781 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Apr 2013 21:44:07 +1000 Date: Tue, 16 Apr 2013 21:44:06 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sepherosa Ziehau Subject: Re: bge(4) sysctl tuneables -- a blast from the past. In-Reply-To: Message-ID: <20130416213235.O1783@besplex.bde.org> References: <1365781568.1418.1.camel@localhost> <20130413200512.G1165@besplex.bde.org> <1366065356.1350.7.camel@localhost> <20130416052500.GA1428@michelle.cdnetworks.com> <20130416162150.X1106@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=HfxM1V48 c=1 sm=1 a=vYrNp6gXSs8A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=_Js9cBt6JEEA:10 a=pwyla-GJPfxvauISbCgA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: YongHyeon PYUN , Sean Bruno , bde , Bruce Evans , "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: Tue, 16 Apr 2013 11:44:16 -0000 On Tue, 16 Apr 2013, Sepherosa Ziehau wrote: > On Tue, Apr 16, 2013 at 3:14 PM, Bruce Evans wrote: > >> bge_rx_coal_ticks == 0 && bge_rx_max_coal_bds == 0 might work accidentally >> if there are enough tx interrupts. There is also the DEVICE_POLLING >> mistake. >> In polling mode, these parameters of course have no effect (Polling mode >> disables interrupts, and the coal parameters have no effect when interrupts >> are disabled). > > As far as I have tested, coalesce BDs and ticks also control how often > status block is updated, so it does affect polling(4) This might explain why polling worked even worse than expected for most things. However, I got reduced latency using it (from ~55 usec ping latency to ~30 usec). 30 usec would be impossible with the default parameters (normal is an average of at least half of bge_rx_coal_ticks). Maybe I had the parameters reduced to bge_rx_coal_bds = 1 when I found 30 usec (then bge_rx_coal_ticks doesn't matter). This is probably what polling should use. Bruce