From owner-svn-src-all@FreeBSD.ORG Sat Sep 4 06:27:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9932510656BA; Sat, 4 Sep 2010 06:27:16 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id AE0358FC0A; Sat, 4 Sep 2010 06:27:15 +0000 (UTC) Received: by wwb13 with SMTP id 13so125492wwb.1 for ; Fri, 03 Sep 2010 23:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=fsTP21XP24AI8we86dbP4RzpbgknR231BcNi5y2TKcA=; b=vR6ieIuypfQJb0Bhu/tOj4jlcOcvdEO6SAnl1qkJQeb7oPo9KOA9qXjiLGUHAOQmM2 rvL40ps6M1fk9EVrKY11OIAZwyA87wzNBe7AgC2zajNJD/IMTpzonjWAexGfLfBJrcmx AXvHvX8eVZMWR9SDEy4JKtjojXTcltCKN664o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=BttirMrg8iFMfV6g3BsO5P04soGlc1MQydi3CYws+6FCGvp0DmLSXD6cFY3VcmEDGi kUs0X4qr07nI30btPQZCgVncFiyBLJSwchIflCdVqsiKgUePLT0UNfwQKNcfDQjtPc7T 3N7ZXH0/L4euiseHIYZPxKcUfcwZ8APxT06z0= MIME-Version: 1.0 Received: by 10.216.28.204 with SMTP id g54mr979836wea.73.1283581634524; Fri, 03 Sep 2010 23:27:14 -0700 (PDT) Received: by 10.216.69.136 with HTTP; Fri, 3 Sep 2010 23:27:14 -0700 (PDT) In-Reply-To: <20100904002933.6fb53534@kan.dnsalias.net> References: <201008311733.o7VHXmxX037013@svn.freebsd.org> <20100904002933.6fb53534@kan.dnsalias.net> Date: Fri, 3 Sep 2010 23:27:14 -0700 Message-ID: From: Pyun YongHyeon To: Alexander Kabaev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r212061 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 06:27:16 -0000 On Fri, Sep 3, 2010 at 9:29 PM, Alexander Kabaev wrote: > 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 >> >> Log: >> =A0 Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA >> =A0 tag. All controllers that are not BCM5755 or higher have 4GB >> =A0 boundary DMA bug. Previously bge(4) used 32bit DMA address to >> =A0 workaround the bug(r199670). However this caused the use of bounce >> =A0 buffers such that it resulted in poor performance for systems which >> =A0 have more than 4GB memory. Because bus_dma(9) honors boundary >> =A0 restriction requirement of DMA tag for dynamic buffers, having a >> =A0 separate TX/RX mbuf DMA tag will greatly reduce the possibility of >> =A0 using bounce buffers. For DMA buffers allocated with >> =A0 bus_dmamem_alloc(9), now bge(4) explicitly checks whether the >> =A0 requested memory region crossed the boundary or not. >> =A0 With this change, only the DMA buffer that crossed the boundary >> =A0 will use 32bit DMA address. Other DMA buffers are not affected as >> =A0 separate DMA tag is created for each DMA buffer. >> =A0 Even if 32bit DMA address space is used for a buffer, the chance to >> =A0 use bounce buffer is still very low as the size of buffer is small. >> =A0 This change should eliminate most usage of bounce buffers on >> =A0 systems that have more than 4GB memory. >> >> =A0 More correct fix would be teaching bus_dma(9) to honor boundary >> =A0 restriction for buffers created with bus_dmamem_alloc(9) but it >> =A0 seems that is not easy. >> >> =A0 While I'm here cleanup bge_dma_map_addr() and remove unnecessary >> =A0 member variables in bge_dmamap_arg structure. >> >> =A0 Tested by: =A0marcel >> >> Modified: >> =A0 head/sys/dev/bge/if_bge.c >> =A0 head/sys/dev/bge/if_bgereg.h >> > > 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: =A00x001002> mem 0xfd8f0000-0xfd8fffff irq 24 at device 9.0 on pci2 > miibus0: on bge0 > brgphy0: PHY 1 on miibus0 > brgphy0: =A010baseT, 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. Sorry, it seems I forgot allocating statistics block. This may cause issues for controllers(e.g. 570x) that support hardware MAC statistics counters. This could be the reason why I couldn't see the issue on 5761. I'm on vacation so I'll fix it Tuesday. If it's urgent please back out this change. > -- > Alexander Kabaev >