kernel_optimize_test/drivers
Rusty Russell b25bd2515e virtio_ring: unify direct/indirect code paths.
virtqueue_add() populates the virtqueue descriptor table from the sgs
given.  If it uses an indirect descriptor table, then it puts a single
descriptor in the descriptor table pointing to the kmalloc'ed indirect
table where the sg is populated.

Previously vring_add_indirect() did the allocation and the simple
linear layout.  We replace that with alloc_indirect() which allocates
the indirect table then chains it like the normal descriptor table so
we can reuse the core logic.

This slows down pktgen by less than 1/2 a percent (which uses direct
descriptors), as well as vring_bench, but it's far neater.

vring_bench before:
	1061485790-1104800648(1.08254e+09+/-6.6e+06)ns
vring_bench after:
	1125610268-1183528965(1.14172e+09+/-8e+06)ns

pktgen before:
   787781-796334(793165+/-2.4e+03)pps 365-369(367.5+/-1.2)Mb/sec (365530384-369498976(3.68028e+08+/-1.1e+06)bps) errors: 0

pktgen after:
   779988-790404(786391+/-2.5e+03)pps 361-366(364.35+/-1.3)Mb/sec (361914432-366747456(3.64885e+08+/-1.2e+06)bps) errors: 0

Now, if we make force indirect descriptors by turning off any_header_sg
in virtio_net.c:

pktgen before:
  713773-721062(718374+/-2.1e+03)pps 331-334(332.95+/-0.92)Mb/sec (331190672-334572768(3.33325e+08+/-9.6e+05)bps) errors: 0
pktgen after:
  710542-719195(714898+/-2.4e+03)pps 329-333(331.15+/-1.1)Mb/sec (329691488-333706480(3.31713e+08+/-1.1e+06)bps) errors: 0

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13 12:52:35 -04:00
..
accessibility
acpi Merge branches 'acpi-video' and 'acpi-ec' 2014-09-05 15:29:12 +02:00
amba
ata ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver. 2014-09-06 11:27:15 +09:00
atm
auxdisplay
base Merge remote-tracking branches 'regmap/fix/cache', 'regmap/fix/debugfs' and 'regmap/fix/volatile' into regmap-linus 2014-08-31 13:23:45 +01:00
bcma Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-09-08 11:14:56 -04:00
block Merge branch 'akpm' (fixes from Andrew Morton) 2014-08-29 16:28:29 -07:00
bluetooth
bus bus: arm-ccn: Move event cleanup routine 2014-09-05 13:25:01 -07:00
cdrom
char
clk
clocksource
connector
cpufreq cpufreq: intel_pstate: Remove unneeded variable 2014-09-03 01:31:04 +02:00
cpuidle ARM: 8130/1: cpuidle/cpuidle-big_little: fix reading cpu id part number 2014-08-27 15:40:45 +01:00
crypto
dca
devfreq
dio
dma
dma-buf dma-buf/fence: Fix a kerneldoc warning 2014-08-28 11:59:09 +05:30
edac
eisa
extcon
firewire
firmware
fmc
gpio gpio: bt8xx: fix release of managed resources 2014-08-29 14:31:43 +02:00
gpu Merge branch 'linux-3.17' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes 2014-09-05 09:27:33 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-08-27 09:38:06 -07:00
hsi
hv
hwmon hwmon: (ds1621) Update zbits after conversion rate change 2014-08-28 11:18:47 -07:00
hwspinlock
i2c Revert "i2c: rcar: remove spinlock" 2014-09-04 19:59:42 +02:00
ide
idle
iio
infiniband mlx4: Set user-space raw Ethernet QPs to properly handle VXLAN traffic 2014-08-29 20:13:00 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-09-03 17:26:12 -07:00
iommu
ipack
irqchip
isdn mISDN: remove DSP_NEVER_DEFINED and adjust code identation 2014-09-05 22:20:21 -07:00
leds Revert "leds: convert blink timer to workqueue" 2014-09-02 10:02:13 -07:00
lguest
macintosh
mailbox
mcb
md dm crypt: fix access beyond the end of allocated space 2014-08-28 14:24:09 -04:00
media
memory
memstick
message
mfd mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators 2014-08-28 15:57:55 +01:00
misc mei: nfc: fix memory leak in error path 2014-08-25 13:16:23 -07:00
mmc
mtd Two trivial MTD updates for 3.17-rc4: 2014-09-06 12:12:09 -07:00
net virtio_net: pass well-formed sgs to virtqueue_add_*() 2014-09-13 12:50:46 -04:00
nfc
ntb
nubus
of
oprofile
parisc
parport
pci PCI update for v3.17: 2014-09-03 08:45:48 -07:00
pcmcia
phy
pinctrl
platform toshiba_acpi: fix and cleanup toshiba_kbd_bl_mode_store() 2014-09-03 10:45:12 -07:00
pnp
power
powercap powercap / RAPL: change domain detection message 2014-09-03 01:29:00 +02:00
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc drivers/rtc/rtc-s5m.c: re-add support for devices without irq specified 2014-08-29 16:28:16 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-07 19:56:38 -07:00
sbus
scsi Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2014-08-29 11:21:49 -07:00
sfi
sh
sn
soc
spi Merge remote-tracking branch 'spi/fix/sh-msiof' into spi-linus 2014-08-31 13:46:19 +01:00
spmi
ssb
staging Merge tag 'master-2014-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2014-09-08 16:43:58 -07:00
target
tc
thermal
thunderbolt thunderbolt: Clear hops before overwriting 2014-08-26 14:54:48 -07:00
tty
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-07 21:41:53 -07:00
uwb
vfio
vhost
video fbdev fixes for 3.17 2014-08-29 11:59:46 -07:00
virt
virtio virtio_ring: unify direct/indirect code paths. 2014-09-13 12:52:35 -04:00
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile