From owner-svn-src-head@FreeBSD.ORG Sat Sep 4 05:00:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E345010656D3; Sat, 4 Sep 2010 05:00:29 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6938FC12; Sat, 4 Sep 2010 05:00:29 +0000 (UTC) Received: by vws7 with SMTP id 7so2105393vws.13 for ; Fri, 03 Sep 2010 22:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=p/t2QcvT8kcNrv6Yxfd8gYGJM7uB1uBuGoZD96XHcKg=; b=jvhIpnR46hVA706GMyEV9VfgfclVA2nxjr68xDFx6RxjHkkPqkDMOBMe/bnVNQxQ2W bpQLbDOOrGcUfiZTeckUNfEVvvhPi8VNmJhPooOIDY0AXPwsKthdzsiVEyWvqlc/aCOB Hl5IWUiaqLFf8sUyt5d6lNStJI7tJ3fjohDZc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=h7e+06Q3xvZIYZTXLMMaIJth4fa97F9ymPTOeLXPCuQTICtAwXR1kHSNHbJcBJtIH1 urzmieue5Rhe3ypyDe5eIVvq7koF3lgl3/3i9GS8c0Ywq2ncRVN1oIOA8FmaeIMnPGSA zXC0sNo18Lh0cuxgatH3s+fk4wYLZcywPxPys= Received: by 10.220.163.10 with SMTP id y10mr610368vcx.63.1283574593182; Fri, 03 Sep 2010 21:29:53 -0700 (PDT) Received: from kan.dnsalias.net (c-24-63-226-98.hsd1.ma.comcast.net [24.63.226.98]) by mx.google.com with ESMTPS id r15sm1702814vbp.0.2010.09.03.21.29.40 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Sep 2010 21:29:49 -0700 (PDT) Date: Sat, 4 Sep 2010 00:29:33 -0400 From: Alexander Kabaev To: Pyun YongHyeon Message-ID: <20100904002933.6fb53534@kan.dnsalias.net> In-Reply-To: <201008311733.o7VHXmxX037013@svn.freebsd.org> References: <201008311733.o7VHXmxX037013@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/UlrpVLuIItmu183c/hIeC+M"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212061 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 05:00:30 -0000 --Sig_/UlrpVLuIItmu183c/hIeC+M Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 31 Aug 2010 17:33:48 +0000 (UTC) Pyun YongHyeon wrote: > Author: yongari > Date: Tue Aug 31 17:33:48 2010 > New Revision: 212061 > URL: http://svn.freebsd.org/changeset/base/212061 >=20 > Log: > Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA > tag. All controllers that are not BCM5755 or higher have 4GB > boundary DMA bug. Previously bge(4) used 32bit DMA address to > workaround the bug(r199670). However this caused the use of bounce > buffers such that it resulted in poor performance for systems which > have more than 4GB memory. Because bus_dma(9) honors boundary > restriction requirement of DMA tag for dynamic buffers, having a > separate TX/RX mbuf DMA tag will greatly reduce the possibility of > using bounce buffers. For DMA buffers allocated with > bus_dmamem_alloc(9), now bge(4) explicitly checks whether the > requested memory region crossed the boundary or not. > With this change, only the DMA buffer that crossed the boundary > will use 32bit DMA address. Other DMA buffers are not affected as > separate DMA tag is created for each DMA buffer. > Even if 32bit DMA address space is used for a buffer, the chance to > use bounce buffer is still very low as the size of buffer is small. > This change should eliminate most usage of bounce buffers on > systems that have more than 4GB memory. > =20 > More correct fix would be teaching bus_dma(9) to honor boundary > restriction for buffers created with bus_dmamem_alloc(9) but it > seems that is not easy. > =20 > While I'm here cleanup bge_dma_map_addr() and remove unnecessary > member variables in bge_dmamap_arg structure. > =20 > Tested by: marcel >=20 > Modified: > head/sys/dev/bge/if_bge.c > head/sys/dev/bge/if_bgereg.h >=20 Hi, with this commit my AMD64 machine reliably reboots after several minutes of uptime. Attempting cvs update of ports from repository located on NFS server seems to make it happen sooner. bge0: mem 0xfd8f0000-0xfd8fffff irq 24 at device 9.0 on pci2 miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto bge0: Ethernet address: 00:e0:81:28:24:e7 bge0: [ITHREAD] Booting kernel tree from just before this commit makes everything work again. --=20 Alexander Kabaev --Sig_/UlrpVLuIItmu183c/hIeC+M Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iD8DBQFMgcszQ6z1jMm+XZYRAiIMAJ9igyXdmnT8tYVe2C06IQeG+InLsgCgzDFR obNOVF90LjnGMTm2RJ4g81w= =09RZ -----END PGP SIGNATURE----- --Sig_/UlrpVLuIItmu183c/hIeC+M--