Re: CFT: msk(4) 64bit DMA support

2011-11-16 Thread YongHyeon PYUN
On Thu, May 26, 2011 at 06:40:43PM -0700, YongHyeon PYUN wrote:
> Hi,
> 
> 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.
> 

Committed to HEAD(r227582).

> Thanks.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CFT: msk(4) 64bit DMA support

2011-06-21 Thread YongHyeon PYUN
On Sun, Jun 05, 2011 at 02:23:57PM -0400, David Schultz wrote:
> 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.
> 

Sorry for late reply.

> After applying this patch, I still see total_bounced increasing:
>   hw.busdma.zone0.total_bounced: 441
> 

Hmm, I guess it could be caused by other drivers in the system. Can
you verify whether all other drivers in the system use 64bit DMA?
I think just testing msk(4) with netperf/iperf will make it clear
(i.e. no disk access).

> 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
> 

MSI has nothing to do with 64bit DMA.

> 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-0xfdef 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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: CFT: msk(4) 64bit DMA support

2011-06-05 Thread David Schultz
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-0xfdef 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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


CFT: msk(4) 64bit DMA support

2011-05-26 Thread YongHyeon PYUN
Hi,

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.

Thanks.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"