From owner-freebsd-hackers@FreeBSD.ORG Mon May 17 22:59:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F192E106564A for ; Mon, 17 May 2010 22:59:29 +0000 (UTC) (envelope-from gonzo@launchpad.bluezbox.com) Received: from launchpad.bluezbox.com (launchpad.bluezbox.com [195.137.202.161]) by mx1.freebsd.org (Postfix) with ESMTP id A3FBE8FC15 for ; Mon, 17 May 2010 22:59:29 +0000 (UTC) Received: from [76.77.86.2] (helo=[192.168.100.37]) by launchpad.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OE9HP-000Kyt-Ac; Mon, 17 May 2010 22:59:27 +0000 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <892C86B0-81B0-433D-BF9C-7CDBD479F6CC@errno.com> Date: Mon, 17 May 2010 15:58:50 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4BE46650.7010008@bluezbox.com> <892C86B0-81B0-433D-BF9C-7CDBD479F6CC@errno.com> To: Sam Leffler X-Mailer: Apple Mail (2.1078) Sender: gonzo@launchpad.bluezbox.com X-Spam-Level: ---- X-Spam-Report: -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.4 AWL AWL: From: address is in the auto white-list Cc: freebsd-hackers@freebsd.org Subject: Re: hifn(4) DMA fix for review X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 22:59:30 -0000 On 2010-05-10, at 8:23 AM, Sam Leffler wrote: >=20 > On May 7, 2010, at 12:13 PM, Oleksandr Tymoshenko wrote: >=20 >> Proposed patch addresses hifn(4) problems on FreeBSD/mips. Current >> implementation keeps some of the state information (indexes in >> buffers, etc) in DMA-mapped memory and bus_dma code invalidates them >> during sync operations. This fix moves data that doesn't belong to = DMA >> ring to softc structure. >>=20 >> Patch: http://people.freebsd.org/~gonzo/hifn.diff >> Stats for original driver: >> http://people.freebsd.org/~gonzo/hifn.stats.orig.txt >> Stats for patched version: >> http://people.freebsd.org/~gonzo/hifn.stats.patched.txt >>=20 >>=20 >=20 > The changes look fine and make sense (did something similar for some = other drivers for when the dma data structures were mapped uncached). I = can't see any performance change in your stats; but I'm just eyeballing = the numbers side-by-side. Was this on x86? (where there should be zero = difference) It would be good to present these numbers better (e.g. = curves on the same graph, ministat output, etc). I took some time to learn gnuplot and here is result: http://people.freebsd.org/~gonzo/hifn-cmp.png The red ones are data from original driver, the blue ones are patched. = There are some=20 fluctuations but I think they're OK. I made three measurements for = original drivers and=20 there are fluctuations too with comparable order of magnitude: http://people.freebsd.org/~gonzo/hifn-orig.png=20 If it's OK - I'll commit fixes --=20 gonzo