From owner-freebsd-current@FreeBSD.ORG Sun Jun 5 18:59:03 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B897E106564A for ; Sun, 5 Jun 2011 18:59:03 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 6699C8FC1A for ; Sun, 5 Jun 2011 18:59:03 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.4/8.14.2) with ESMTP id p55INv5X002494; Sun, 5 Jun 2011 14:23:57 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.4/8.14.2/Submit) id p55INvXj002493; Sun, 5 Jun 2011 14:23:57 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sun, 5 Jun 2011 14:23:57 -0400 From: David Schultz To: YongHyeon PYUN Message-ID: <20110605182357.GA2373@zim.MIT.EDU> Mail-Followup-To: YongHyeon PYUN , freebsd-current@freebsd.org References: <20110527014043.GE18312@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110527014043.GE18312@michelle.cdnetworks.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: CFT: msk(4) 64bit DMA support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2011 18:59:03 -0000 85;95;0cOn Thu, May 26, 2011, YongHyeon PYUN wrote: > Here is a patch that implements 64bit DMA on msk(4). If you use > msk(4) on a system that has more than 4GB memory, please try the > patch at the following URL and let me know whether it works or not. > You need latest msk(4) in HEAD to apply the patch. > http://people.freebsd.org/~yongari/msk/msk.64bit.dma.diff > > Previously msk(4) may have used bounce buffers on systems that have > more than 4GB memory. You can verify whether msk(4) is using bounce > buffers by checking the output of "sysctl hw.busdma". For instance, > hw.busdma.zone0.total_bounced counter would increase while network > operation is in progress. If patch above works you wouldn't see > the counter change anymore and it would also enhance network > performance since it wouldn't have to copy from or to bounce > buffers. After applying this patch, I still see total_bounced increasing: hw.busdma.zone0.total_bounced: 441 Note that I have MSI disabled to work around some issues with the card becoming wedged: hw.pci.enable_msix=0 hw.pci.enable_msi=0 Possibly relevant bits of dmesg: FreeBSD 9.0-CURRENT #4 r222717M: Sun Jun 5 12:27:07 EDT 2011 CPU: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz (3000.06-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x10676 Family = 6 Model = 17 Stepping = 6 Features=0xbfebfbff Features2=0x8e3fd AMD Features=0x20100800 AMD Features2=0x1 TSC: P-state invariant, performance statistics real memory = 8589934592 (8192 MB) avail memory = 8246677504 (7864 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) ioapic0: Changing APIC ID to 4 ioapic0 irqs 0-23 on motherboard mskc0: port 0xae00-0xaeff mem 0xfdefc000-0xfdefffff irq 17 at device 0.0 on pci4 msk0: on mskc0 msk0: Ethernet address: 00:01:29:a3:3c:a3 miibus0: on msk0 e1000phy0: PHY 0 on miibus0 e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow msk0: link state changed to UP