On Fri, Sep 3, 2010 at 9:29 PM, Alexander Kabaev <kab...@gmail.com> wrote: > On Tue, 31 Aug 2010 17:33:48 +0000 (UTC) > Pyun YongHyeon <yong...@freebsd.org> 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: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. > 0x001002> mem 0xfd8f0000-0xfd8fffff irq 24 at device 9.0 on pci2 > miibus0: <MII bus> on bge0 > brgphy0: <BCM5703 10/100/1000baseTX PHY> 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. > -- > Alexander Kabaev > _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"