From owner-svn-src-head@FreeBSD.ORG Tue Sep 7 18:31:10 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 EC58410656A9; Tue, 7 Sep 2010 18:31:10 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id A5D138FC14; Tue, 7 Sep 2010 18:31:10 +0000 (UTC) Received: by pxi17 with SMTP id 17so1713509pxi.13 for ; Tue, 07 Sep 2010 11:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=sCROuf1W2SYba8yA0e1JT4oFw33jXHei2Ex+VKmTFFw=; b=MrT5rKp3UpvRZa3QorubJTq5fL3HZHM3fM9T7F1a9ESiEM0CqaJT6GtiVaMwFw/7Gk nuf8+whJdL9K90yITGpktv2IyBxcjQVtCDYNt/I77Kwp3+Nz/w9HDFDobvgSBiwJbrLL 8jyY7w3cBbl++e/4XjeB12AvgNgLEYVuKV0PE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=mADFHAWT3EuVRLQXSCL8quggi0zzl5S6kXJ6l47D7UjLfvreJjtS7VMa1nyzawFtmX NXKX8GATBUyxdFwzq6uNo9NEHK0iazYb8Pifwch7RenapLzVR5hFtgJ/jUrogtqHvKdx +y413QOCvrrbAi4j3E066tj7q9y++BGOPZeOY= Received: by 10.142.60.21 with SMTP id i21mr12351wfa.175.1283884269989; Tue, 07 Sep 2010 11:31:09 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id l41sm6100174wfa.1.2010.09.07.11.31.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Sep 2010 11:31:08 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 7 Sep 2010 11:30:49 -0700 From: Pyun YongHyeon Date: Tue, 7 Sep 2010 11:30:49 -0700 To: Alexander Kabaev Message-ID: <20100907183049.GE1439@michelle.cdnetworks.com> References: <201008311733.o7VHXmxX037013@svn.freebsd.org> <20100904002933.6fb53534@kan.dnsalias.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com 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: Tue, 07 Sep 2010 18:31:11 -0000 On Fri, Sep 03, 2010 at 11:27:14PM -0700, Pyun YongHyeon wrote: > 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: > >> ? 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. > >> > >> ? 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. > >> > >> ? While I'm here cleanup bge_dma_map_addr() and remove unnecessary > >> ? member variables in bge_dmamap_arg structure. > >> > >> ? Tested by: ?marcel > >> > >> Modified: > >> ? head/sys/dev/bge/if_bge.c > >> ? 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: > ?0x001002> 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. > > 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. > Fix committed in r212302.