android_kernel_motorola_sm6225/drivers
Paolo Bonzini 9141a4ca0d virtio-scsi: introduce multiqueue support
This patch adds queue steering to virtio-scsi.  When a target is sent
multiple requests, we always drive them to the same queue so that FIFO
processing order is kept.  However, if a target was idle, we can choose
a queue arbitrarily.  In this case the queue is chosen according to the
current VCPU, so the driver expects the number of request queues to be
equal to the number of VCPUs.  This makes it easy and fast to select
the queue, and also lets the driver optimize the IRQ affinity for the
virtqueues (each virtqueue's affinity is set to the CPU that "owns"
the queue).

The speedup comes from improving cache locality and giving CPU affinity
to the virtqueues, which is why this scheme was selected.  Assuming that
the thread that is sending requests to the device is I/O-bound, it is
likely to be sleeping at the time the ISR is executed, and thus executing
the ISR on the same processor that sent the requests is cheap.

However, the kernel will not execute the ISR on the "best" processor
unless you explicitly set the affinity.  This is because in practice
you will have many such I/O-bound processes and thus many otherwise
idle processors.  Then the kernel will execute the ISR on a random
processor, rather than the one that is sending requests to the device.

The alternative to per-CPU virtqueues is per-target virtqueues.  To
achieve the same locality, we could dynamically choose the virtqueue's
affinity based on the CPU of the last task that sent a request.  This
is less appealing because we do not set the affinity directly---we only
provide a hint to the irqbalanced running in userspace.  Dynamically
changing the affinity only works if the userspace applies the hint
fast enough.

Cc: linux-scsi@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: Asias He <asias@redhat.com>
Tested-by: Venkatesh Srinivas <venkateshs@google.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-04-08 23:06:55 +09:30
..
accessibility
acpi x86, ACPI, mm: Revert movablemem_map support 2013-03-02 09:34:39 -08:00
amba Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-03-03 11:54:39 -08:00
ata 1) apply, and then revert, the sysfs export of ATA host controller number. 2013-02-24 17:32:15 -08:00
atm hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
auxdisplay
base CHROMIUM: dma-buf: restore args on failure of dma_buf_mmap 2013-02-27 15:14:02 +05:30
bcma
block virtio_blk: remove nents member. 2013-03-20 15:44:58 +10:30
bluetooth
bus
cdrom
char virtio_console: make local symbols static 2013-04-08 23:00:26 +09:30
clk hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
clocksource ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
connector
cpufreq ACPI and power management fixes for 3.9-rc1 2013-02-25 21:25:17 -08:00
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-02-25 15:56:15 -08:00
dca dca: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
devfreq
dio
dma Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-03-03 10:20:22 -08:00
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2013-02-28 20:42:33 -08:00
eisa
extcon
firewire firewire: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
firmware Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-27 16:17:42 -08:00
gpio gpio: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
gpu hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
hsi hsi: fix kernel-doc warnings 2013-03-01 13:39:00 -08:00
hv Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts 2013-02-27 10:15:53 -08:00
hwmon
hwspinlock
i2c idr: remove MAX_IDR_MASK and move left MAX_IDR_* into idr.c 2013-02-27 19:10:20 -08:00
ide Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
idle Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-22 19:25:09 -08:00
iio
infiniband hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-03-03 12:58:43 -08:00
iommu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
ipack
irqchip ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
isdn hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2013-02-26 09:29:02 -08:00
lguest lguest: fix paths in comments 2013-03-07 09:56:46 +11:00
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-02-23 17:09:55 -08:00
mailbox
md dm cache: add cleaner policy 2013-03-01 22:45:52 +00:00
media arm-soc: late OMAP changes 2013-02-28 20:00:40 -08:00
memory
memstick memstick: move the dereference below the NULL test 2013-02-27 19:10:23 -08:00
message
mfd mfd: convert to idr_alloc() 2013-02-27 19:10:17 -08:00
misc KGDB/KDB fixes and cleanups 2013-03-02 08:31:39 -08:00
mmc Merge branches 'devel-stable', 'fixes' and 'mmci' into for-linus 2013-03-03 00:32:50 +00:00
mtd Fairly unexciting MTD merge for 3.9: 2013-03-02 16:33:54 -08:00
net caif_virtio: fix error return code in cfv_create_genpool() 2013-04-02 16:48:25 +10:30
nfc
ntb
nubus
of
oprofile oprofilefs: add missing ->i_mutex locking in object creation 2013-02-22 23:31:38 -05:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
parport
pci hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
pcmcia
pinctrl
platform Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2013-03-03 10:16:19 -08:00
pnp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
power power: convert to idr_alloc() 2013-02-27 19:10:18 -08:00
pps drivers/pps/clients/pps-gpio.c: use devm_kzalloc 2013-02-27 19:10:23 -08:00
ps3
ptp
pwm pwm: Changes for v3.9-rc1 2013-02-26 09:34:29 -08:00
rapidio
regulator
remoteproc remoteproc: convert to idr_alloc() 2013-02-27 19:10:18 -08:00
rpmsg virtio_rpmsg_bus: use simplified virtqueue accessors. 2013-03-20 15:45:05 +10:30
rtc rtc: stmp3xxx: add wdt-accessor function 2013-03-01 12:40:36 +01:00
s390 qdio: remove unused parameters 2013-02-28 09:37:12 +01:00
sbus Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
scsi virtio-scsi: introduce multiqueue support 2013-04-08 23:06:55 +09:30
sfi
sh
sn
spi
ssb
staging Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-03-03 13:23:03 -08:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-03-02 11:43:27 -08:00
tc
thermal Fix mis-merge of intel_powerclamp.c resulting in compile error 2013-02-28 20:23:09 -08:00
tty Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-03-03 13:23:03 -08:00
uio uio: convert to idr_alloc() 2013-02-27 19:10:19 -08:00
usb USB patch revert for 3.9-rc1 2013-03-03 10:24:57 -08:00
uwb
vfio vfio: convert to idr_alloc() 2013-02-27 19:10:19 -08:00
vhost vringh: host-side implementation of virtio rings. 2013-03-20 14:05:33 +10:30
video backlight: add new lp8788 backlight driver 2013-02-27 19:10:09 -08:00
virt
virtio virtio_balloon: use simplified virtqueue accessors. 2013-03-20 15:45:06 +10:30
vlynq
vme
w1 arm-soc: i.MX DT changes 2013-02-28 19:59:34 -08:00
watchdog watchdog: sp805_wdt depends on ARM 2013-03-01 12:56:26 +01:00
xen Bug-fixes: 2013-03-03 14:22:53 -08:00
zorro new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Kconfig
Makefile vringh: host-side implementation of virtio rings. 2013-03-20 14:05:33 +10:30