linux/drivers
Michal Schmidt bb976b0ffd r8169: use unlimited DMA burst for TX
commit aee77e4acc upstream.

The r8169 driver currently limits the DMA burst for TX to 1024 bytes. I have
a box where this prevents the interface from using the gigabit line to its full
potential. This patch solves the problem by setting TX_DMA_BURST to unlimited.

The box has an ASRock B75M motherboard with on-board RTL8168evl/8111evl
(XID 0c900880). TSO is enabled.

I used netperf (TCP_STREAM test) to measure the dependency of TX throughput
on MTU. I did it for three different values of TX_DMA_BURST ('5'=512, '6'=1024,
'7'=unlimited). This chart shows the results:
http://michich.fedorapeople.org/r8169/r8169-effects-of-TX_DMA_BURST.png

Interesting points:
 - With the current DMA burst limit (1024):
   - at the default MTU=1500 I get only 842 Mbit/s.
   - when going from small MTU, the performance rises monotonically with
     increasing MTU only up to a peak at MTU=1076 (908 MBit/s). Then there's
     a sudden drop to 762 MBit/s from which the throughput rises monotonically
     again with further MTU increases.
 - With a smaller DMA burst limit (512):
   - there's a similar peak at MTU=1076 and another one at MTU=564.
 - With unlimited DMA burst:
   - at the default MTU=1500 I get nice 940 Mbit/s.
   - the throughput rises monotonically with increasing MTU with no strange
     peaks.

Notice that the peaks occur at MTU sizes that are multiples of the DMA burst
limit plus 52. Why 52? Because:
  20 (IP header) + 20 (TCP header) + 12 (TCP options) = 52

The Realtek-provided r8168 driver (v8.032.00) uses unlimited TX DMA burst too,
except for CFG_METHOD_1 where the TX DMA burst is set to 512 bytes.
CFG_METHOD_1 appears to be the oldest MAC version of "RTL8168B/8111B",
i.e. RTL_GIGA_MAC_VER_11 in r8169. Not sure if this MAC version really needs
the smaller burst limit, or if any other versions have similar requirements.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26 11:34:36 -08:00
..
accessibility
acpi ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop 2012-10-21 09:17:09 -07:00
amba
ata libata: Prevent interface errors with Seagate FreeAgent GoFlex 2012-10-02 09:47:41 -07:00
atm solos-pci: Fix DMA support 2012-06-10 00:32:58 +09:00
auxdisplay
base PM / Runtime: Clear power.deferred_resume on success in rpm_suspend() 2012-10-02 09:47:40 -07:00
bcma bcma: fix unregistration of cores 2012-10-31 09:51:37 -07:00
block x86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility 2012-11-05 09:44:26 +01:00
bluetooth Bluetooth: Add support for Apple vendor-specific devices 2012-10-02 09:47:41 -07:00
cdrom cdrom: use copy_to_user() without the underscores 2012-02-29 16:34:35 -08:00
char tpm: Propagate error from tpm_transmit to fix a timeout hang 2012-10-21 09:17:12 -07:00
clk
clocksource
connector
cpufreq cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code 2012-10-31 09:51:37 -07:00
cpuidle
crypto crypto: mv_cesa requires on CRYPTO_HASH to build 2012-05-21 09:40:03 -07:00
dca
dio
dma dmaengine: at_hdmac: check that each sg data length is non-null 2012-10-02 09:47:37 -07:00
edac amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[] 2012-10-28 10:02:12 -07:00
eisa
firewire firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel) 2012-10-21 09:17:10 -07:00
firmware firmware: Add missing attributes to EFI variable attribute print out from sysfs 2012-10-07 08:27:25 -07:00
gpio pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH 2012-05-21 09:40:05 -07:00
gpu drm/i915: clear the entire sdvo infoframe buffer 2012-11-17 13:14:25 -08:00
hid HID: add more hotkeys in Asus AIO keyboards 2012-04-02 09:27:12 -07:00
hwmon hwmon: (w83627ehf) Force initial bank selection 2012-11-17 13:14:22 -08:00
hwspinlock hwspinlock/core: use a mutex to protect the radix tree 2011-11-11 09:36:31 -08:00
i2c i2c: davinci: Free requested IRQ in remove 2012-06-01 15:13:01 +08:00
ide block: add and use scsi_blk_cmd_ioctl 2012-01-25 17:24:54 -08:00
idle intel_idle: fix API misuse 2012-01-25 17:24:56 -08:00
ieee802154
infiniband IB/srp: Avoid having aborted requests hang 2012-10-07 08:27:27 -07:00
input Input: i8042 - disable mux on Toshiba C850D 2012-10-02 09:47:27 -07:00
isdn isdnloop: fix and simplify isdnloop_init() 2012-10-02 09:47:05 -07:00
leds Revert "leds: save the delay values after a successful call to blink_set()" 2011-11-21 14:31:19 -08:00
lguest
macintosh
mca
md dm: handle requests beyond end of device instead of using BUG_ON 2012-10-07 08:27:23 -07:00
media media: au0828: fix case where STREAMOFF being called on stopped stream causes BUG() 2012-10-28 10:02:12 -07:00
memstick
message
mfd ARM: pxa: remove irq_to_gpio from ezx-pcap driver 2012-08-15 12:04:30 -07:00
misc drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources 2012-10-02 09:47:40 -07:00
mmc mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes. 2012-10-02 09:47:54 -07:00
mtd mtd: omap2: fix module loading 2012-10-13 05:28:15 +09:00
net r8169: use unlimited DMA burst for TX 2012-11-26 11:34:36 -08:00
nfc
nubus
of
oprofile oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array 2012-07-16 08:47:48 -07:00
parisc
parport
pci intel-iommu: Fix AB-BA lockdep report 2012-11-17 13:14:26 -08:00
pcmcia pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops 2012-10-28 10:02:11 -07:00
platform asus-nb-wmi: add some video toggle keys 2012-10-02 09:47:40 -07:00
pnp PNPACPI: Fix device ref leaking in acpi_pnp_match 2012-04-13 08:14:05 -07:00
power drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal 2011-11-11 09:36:32 -08:00
pps
ps3
ptp ptp: Fix clock_getres() implementation 2011-12-21 12:57:36 -08:00
rapidio rapidio: fix use of non-compatible registers 2011-10-03 11:39:46 -07:00
regulator regulator: Fix the logic to ensure new voltage setting in valid range 2012-05-21 09:39:58 -07:00
rtc drivers/rtc/rtc-imxdi.c: add missing spin lock initialization 2012-10-31 09:51:34 -07:00
s390 SCSI: zfcp: only access zfcp_scsi_dev for valid scsi_device 2012-10-13 05:28:09 +09:00
sbus
scsi drivers/scsi/atp870u.c: fix bad use of udelay 2012-10-13 05:28:03 +09:00
sfi
sh
sn
spi spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control 2012-10-02 09:47:54 -07:00
ssb ssb: fix init regression with SoCs 2012-01-06 14:13:48 -08:00
staging staging: comedi: amplc_pc236: fix invalid register access during detach 2012-10-31 09:51:42 -07:00
target target: Don't return success from module_init() if setup fails 2012-11-17 13:14:20 -08:00
tc
telephony
thermal
tty n_gsm: memory leak in uplink error path 2012-10-07 08:27:26 -07:00
uio
usb USB: option: add Alcatel X220/X500D USB IDs 2012-11-26 11:34:35 -08:00
uwb uwb: fix error handling 2012-04-27 09:51:06 -07:00
vhost vhost: fix mergeable bufs on BE hosts 2012-10-31 09:51:36 -07:00
video viafb: don't touch clock state on OLPC XO-1.5 2012-10-21 09:17:10 -07:00
virtio virtio-pci: fix use after free 2011-11-21 14:31:14 -08:00
vlynq
w1 drivers/power/ds2780_battery.c: add a nolock function to w1 interface 2011-11-11 09:36:32 -08:00
watchdog hpwdt: Fix kdump issue in hpwdt 2012-10-02 09:47:27 -07:00
xen xen/xenbus: Add quirk to deal with misconfigured backends. 2012-04-27 09:51:05 -07:00
zorro zorro: Defer device_register() until all devices have been identified 2011-10-03 11:40:57 -07:00
Kconfig
Makefile