]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Thu, 20 Sep 2012 04:16:52 +0000 (14:16 +1000)]
Merge remote-tracking branch 'security/next'

12 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 04:15:10 +0000 (14:15 +1000)]
Merge remote-tracking branch 'regulator/for-next'

Conflicts:
Documentation/devicetree/bindings/regulator/tps6586x.txt

12 years agoMerge remote-tracking branch 'omap_dss2/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 04:13:33 +0000 (14:13 +1000)]
Merge remote-tracking branch 'omap_dss2/for-next'

12 years agoMerge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Thu, 20 Sep 2012 04:11:56 +0000 (14:11 +1000)]
Merge remote-tracking branch 'fbdev/fbdev-next'

12 years agoMerge remote-tracking branch 'battery/master'
Stephen Rothwell [Thu, 20 Sep 2012 04:10:12 +0000 (14:10 +1000)]
Merge remote-tracking branch 'battery/master'

12 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 04:03:11 +0000 (14:03 +1000)]
Merge remote-tracking branch 'mfd/for-next'

Conflicts:
Documentation/devicetree/bindings/regulator/tps6586x.txt
drivers/mfd/88pm860x-core.c
drivers/mfd/max8925-core.c
drivers/mfd/tc3589x.c
drivers/regulator/anatop-regulator.c

12 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:38:46 +0000 (13:38 +1000)]
Merge remote-tracking branch 'md/for-next'

12 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:37:05 +0000 (13:37 +1000)]
Merge remote-tracking branch 'slab/for-next'

12 years agoMerge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:35:29 +0000 (13:35 +1000)]
Merge remote-tracking branch 'kgdb/kgdb-next'

12 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:33:52 +0000 (13:33 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Thu, 20 Sep 2012 03:32:09 +0000 (13:32 +1000)]
Merge branch 'quilt/device-mapper'

12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:25:41 +0000 (13:25 +1000)]
Merge remote-tracking branch 'block/for-next'

12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:21:24 +0000 (13:21 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Thu, 20 Sep 2012 03:19:44 +0000 (13:19 +1000)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Thu, 20 Sep 2012 03:13:48 +0000 (13:13 +1000)]
Merge branch 'quilt/rr'

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:12:08 +0000 (13:12 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

Conflicts:
arch/arm/mach-imx/mach-imx27_visstrim_m10.c

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:10:13 +0000 (13:10 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Thu, 20 Sep 2012 03:08:27 +0000 (13:08 +1000)]
Merge remote-tracking branch 'drm/drm-next'

Conflicts:
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_sdvo.c

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Thu, 20 Sep 2012 02:10:41 +0000 (12:10 +1000)]
Merge remote-tracking branch 'crypto/master'

Conflicts:
crypto/Kconfig

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Thu, 20 Sep 2012 02:08:59 +0000 (12:08 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'mtd/master'
Stephen Rothwell [Thu, 20 Sep 2012 02:07:17 +0000 (12:07 +1000)]
Merge remote-tracking branch 'mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Thu, 20 Sep 2012 02:05:41 +0000 (12:05 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Thu, 20 Sep 2012 01:58:20 +0000 (11:58 +1000)]
Merge remote-tracking branch 'net-next/master'

Conflicts:
net/ipv4/fib_frontend.c
net/ipv4/route.c
net/socket.c

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:56:38 +0000 (11:56 +1000)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:54:57 +0000 (11:54 +1000)]
Merge remote-tracking branch 'target-updates/for-next'

12 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:52:57 +0000 (11:52 +1000)]
Merge remote-tracking branch 'scsi/for-next'

Conflicts:
drivers/scsi/ipr.c
drivers/scsi/qla2xxx/qla_nx.c

12 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:51:22 +0000 (11:51 +1000)]
Merge remote-tracking branch 'dlm/next'

12 years agoMerge remote-tracking branch 'ubi/linux-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:49:48 +0000 (11:49 +1000)]
Merge remote-tracking branch 'ubi/linux-next'

12 years agoMerge remote-tracking branch 'thermal/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:48:11 +0000 (11:48 +1000)]
Merge remote-tracking branch 'thermal/next'

12 years agoMerge remote-tracking branch 'cpuidle/cpuidle-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:48:04 +0000 (11:48 +1000)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'

Conflicts:
drivers/cpuidle/coupled.c
include/linux/cpuidle.h

12 years agoMerge remote-tracking branch 'pstore/master'
Stephen Rothwell [Thu, 20 Sep 2012 01:46:23 +0000 (11:46 +1000)]
Merge remote-tracking branch 'pstore/master'

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:44:41 +0000 (11:44 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'libata/NEXT'
Stephen Rothwell [Thu, 20 Sep 2012 01:42:59 +0000 (11:42 +1000)]
Merge remote-tracking branch 'libata/NEXT'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:41:25 +0000 (11:41 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:39:42 +0000 (11:39 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Thu, 20 Sep 2012 01:37:40 +0000 (11:37 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
arch/arm/mach-imx/mach-imx27_visstrim_m10.c

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:30:33 +0000 (11:30 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Thu, 20 Sep 2012 01:29:05 +0000 (11:29 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:27:39 +0000 (11:27 +1000)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Thu, 20 Sep 2012 01:26:10 +0000 (11:26 +1000)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:24:24 +0000 (11:24 +1000)]
Merge remote-tracking branch 'hid/for-next'

12 years agoMerge remote-tracking branch 'galak/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:22:57 +0000 (11:22 +1000)]
Merge remote-tracking branch 'galak/next'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:21:21 +0000 (11:21 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:18:50 +0000 (11:18 +1000)]
Merge remote-tracking branch 'powerpc/next'

12 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Thu, 20 Sep 2012 01:15:32 +0000 (11:15 +1000)]
Merge remote-tracking branch 'pci/next'

12 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:11:19 +0000 (11:11 +1000)]
Merge remote-tracking branch 'vfs/for-next'

12 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:09:45 +0000 (11:09 +1000)]
Merge remote-tracking branch 'xfs/for-next'

12 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:08:16 +0000 (11:08 +1000)]
Merge remote-tracking branch 'ubifs/linux-next'

12 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:06:48 +0000 (11:06 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

12 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:05:12 +0000 (11:05 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

12 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:03:41 +0000 (11:03 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Thu, 20 Sep 2012 01:02:15 +0000 (11:02 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Thu, 20 Sep 2012 01:00:49 +0000 (11:00 +1000)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'jfs/jfs-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:59:24 +0000 (10:59 +1000)]
Merge remote-tracking branch 'jfs/jfs-next'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Thu, 20 Sep 2012 00:57:56 +0000 (10:57 +1000)]
Merge remote-tracking branch 'gfs2/master'

Conflicts:
fs/gfs2/rgrp.c

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:56:21 +0000 (10:56 +1000)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Thu, 20 Sep 2012 00:54:51 +0000 (10:54 +1000)]
Merge remote-tracking branch 'ext4/dev'

12 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Thu, 20 Sep 2012 00:53:27 +0000 (10:53 +1000)]
Merge remote-tracking branch 'ext3/for_next'

12 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:51:55 +0000 (10:51 +1000)]
Merge remote-tracking branch 'cifs/for-next'

12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Thu, 20 Sep 2012 00:50:25 +0000 (10:50 +1000)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 'sparc-next/master'
Stephen Rothwell [Thu, 20 Sep 2012 00:48:57 +0000 (10:48 +1000)]
Merge remote-tracking branch 'sparc-next/master'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Thu, 20 Sep 2012 00:43:50 +0000 (10:43 +1000)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'openrisc/for-upstream'
Stephen Rothwell [Thu, 20 Sep 2012 00:42:23 +0000 (10:42 +1000)]
Merge remote-tracking branch 'openrisc/for-upstream'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:40:57 +0000 (10:40 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:39:33 +0000 (10:39 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

12 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:38:08 +0000 (10:38 +1000)]
Merge remote-tracking branch 'm68k/for-next'

12 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Thu, 20 Sep 2012 00:36:41 +0000 (10:36 +1000)]
Merge remote-tracking branch 'ia64/next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:35:16 +0000 (10:35 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Thu, 20 Sep 2012 00:30:10 +0000 (10:30 +1000)]
Merge remote-tracking branch 'arm64/upstream'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Thu, 20 Sep 2012 00:28:39 +0000 (10:28 +1000)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

Conflicts:
arch/arm/kernel/hw_breakpoint.c

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Thu, 20 Sep 2012 00:27:10 +0000 (10:27 +1000)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:35 +0000 (10:23 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:33 +0000 (10:23 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:23 +0000 (10:23 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:22 +0000 (10:23 +1000)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:20 +0000 (10:23 +1000)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:19 +0000 (10:23 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Thu, 20 Sep 2012 00:23:18 +0000 (10:23 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agodrivers/virtio/virtio_pci.c: fix error return code
Peter Senna Tschudin [Mon, 17 Sep 2012 17:31:17 +0000 (19:31 +0200)]
drivers/virtio/virtio_pci.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: don't crash when device is buggy
Michael S. Tsirkin [Thu, 20 Sep 2012 00:14:56 +0000 (10:14 +1000)]
virtio: don't crash when device is buggy

Because of a sanity check in virtio_dev_remove, a buggy device can crash
kernel.  And in case of rproc it's userspace so it's not a good idea.
We are unloading a driver so how bad can it be?
Be less aggressive in handling this error: if it's a driver bug,
warning once should be enough.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: remove CONFIG_VIRTIO_RING
Rusty Russell [Thu, 20 Sep 2012 00:14:56 +0000 (10:14 +1000)]
virtio: remove CONFIG_VIRTIO_RING

Everyone who selects VIRTIO is also made to select VIRTIO_RING; just make
them synonymous, since we removed the indirection layer some time ago.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: add help to CONFIG_VIRTIO option.
Rusty Russell [Thu, 20 Sep 2012 00:14:55 +0000 (10:14 +1000)]
virtio: add help to CONFIG_VIRTIO option.

Trying to enable a virtio driver (eg CONFIG_VIRTIO_BLK) is painful
because it depends on CONFIG_VIRTIO.  CONFIG_VIRTIO doesn't tell you
how to turn it on (it's selected from anything which provides a virtio
bus).

This patch at least adds some documentation, visible in menuconfig, as
a hint.

Reported-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: support reserved vqs
Michael S. Tsirkin [Wed, 5 Sep 2012 18:47:45 +0000 (21:47 +0300)]
virtio: support reserved vqs

virtio network device multiqueue support reserves
vq 3 for future use (useful both for future extensions and to make it
pretty - this way receive vqs have even and transmit - odd numbers).
Make it possible to skip initialization for
specific vq numbers by specifying NULL for name.
Document this usage as well as (existing) NULL callback.

Drivers using this not coded up yet, so I simply tested
with virtio-pci and verified that this patch does
not break existing drivers.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: introduce an API to set affinity for a virtqueue
Jason Wang [Tue, 28 Aug 2012 11:54:14 +0000 (13:54 +0200)]
virtio: introduce an API to set affinity for a virtqueue

Sometimes, virtio device need to configure irq affinity hint to maximize the
performance. Instead of just exposing the irq of a virtqueue, this patch
introduce an API to set the affinity for a virtqueue.

The api is best-effort, the affinity hint may not be set as expected due to
platform support, irq sharing or irq type. Currently, only pci method were
implemented and we set the affinity according to:

- if device uses INTX, we just ignore the request
- if device has per vq vector, we force the affinity hint
- if the virtqueues share MSI, make the affinity OR over all affinities
  requested

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio-ring: move queue_index to vring_virtqueue
Jason Wang [Tue, 28 Aug 2012 11:54:13 +0000 (13:54 +0200)]
virtio-ring: move queue_index to vring_virtqueue

Instead of storing the queue index in transport-specific virtio structs,
this patch moves them to vring_virtqueue and introduces an helper to get
the value.  This lets drivers simplify their management and tracing of
virtqueues.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio_balloon: not EXPERIMENTAL any more.
Rusty Russell [Thu, 20 Sep 2012 00:14:54 +0000 (10:14 +1000)]
virtio_balloon: not EXPERIMENTAL any more.

It is not experimental in any vaguely-sane sense.

Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio-balloon: dependency fix
Michael S. Tsirkin [Thu, 20 Sep 2012 00:14:54 +0000 (10:14 +1000)]
virtio-balloon: dependency fix

Devices should depend on virtio, not select it.  It's supposed to be
selected by the particular driver, e.g. VIRTIO_PCI.
Make balloon depend on VIRTIO and EXPERIMENTAL
(to match description).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio-blk: fix NULL checking in virtblk_alloc_req()
Dan Carpenter [Wed, 5 Sep 2012 12:32:53 +0000 (15:32 +0300)]
virtio-blk: fix NULL checking in virtblk_alloc_req()

Smatch complains about the inconsistent NULL checking here.  Fix it to
return NULL on failure.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (fixed accidental deletion)
12 years agovirtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path
Asias He [Wed, 8 Aug 2012 08:07:05 +0000 (16:07 +0800)]
virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path

We need to support both REQ_FLUSH and REQ_FUA for bio based path since
it does not get the sequencing of REQ_FUA into REQ_FLUSH that request
based drivers can request.

REQ_FLUSH is emulated by:
A) If the bio has no data to write:
1. Send VIRTIO_BLK_T_FLUSH to device,
2. In the flush I/O completion handler, finish the bio

B) If the bio has data to write:
1. Send VIRTIO_BLK_T_FLUSH to device
2. In the flush I/O completion handler, send the actual write data to device
3. In the write I/O completion handler, finish the bio

REQ_FUA is emulated by:
1. Send the actual write data to device
2. In the write I/O completion handler, send VIRTIO_BLK_T_FLUSH to device
3. In the flush I/O completion handler, finish the bio

Changes in v7:
- Using vbr->flags to trace request type
- Dropped unnecessary struct virtio_blk *vblk parameter
- Reuse struct virtblk_req in bio done function

Cahnges in v6:
- Reworked REQ_FLUSH and REQ_FUA emulatation order

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio-blk: Add bio-based IO path for virtio-blk
Asias He [Wed, 8 Aug 2012 08:07:04 +0000 (16:07 +0800)]
virtio-blk: Add bio-based IO path for virtio-blk

This patch introduces bio-based IO path for virtio-blk.

Compared to request-based IO path, bio-based IO path uses driver
provided ->make_request_fn() method to bypasses the IO scheduler. It
handles the bio to device directly without allocating a request in block
layer. This reduces the IO path in guest kernel to achieve high IOPS
and lower latency. The downside is that guest can not use the IO
scheduler to merge and sort requests. However, this is not a big problem
if the backend disk in host side uses faster disk device.

When the bio-based IO path is not enabled, virtio-blk still uses the
original request-based IO path, no performance difference is observed.

Using a slow device e.g. normal SATA disk, the bio-based IO path for
sequential read and write are slower than req-based IO path due to lack
of merge in guest kernel. So we make the bio-based path optional.

Performance evaluation:
-----------------------------
1) Fio test is performed in a 8 vcpu guest with ramdisk based guest using
kvm tool.

Short version:
 With bio-based IO path, sequential read/write, random read/write
 IOPS boost         : 28%, 24%, 21%, 16%
 Latency improvement: 32%, 17%, 21%, 16%

Long version:
 With bio-based IO path:
  seq-read  : io=2048.0MB, bw=116996KB/s, iops=233991 , runt= 17925msec
  seq-write : io=2048.0MB, bw=100829KB/s, iops=201658 , runt= 20799msec
  rand-read : io=3095.7MB, bw=112134KB/s, iops=224268 , runt= 28269msec
  rand-write: io=3095.7MB, bw=96198KB/s,  iops=192396 , runt= 32952msec
    clat (usec): min=0 , max=2631.6K, avg=58716.99, stdev=191377.30
    clat (usec): min=0 , max=1753.2K, avg=66423.25, stdev=81774.35
    clat (usec): min=0 , max=2915.5K, avg=61685.70, stdev=120598.39
    clat (usec): min=0 , max=1933.4K, avg=76935.12, stdev=96603.45
  cpu : usr=74.08%, sys=703.84%, ctx=29661403, majf=21354, minf=22460954
  cpu : usr=70.92%, sys=702.81%, ctx=77219828, majf=13980, minf=27713137
  cpu : usr=72.23%, sys=695.37%, ctx=88081059, majf=18475, minf=28177648
  cpu : usr=69.69%, sys=654.13%, ctx=145476035, majf=15867, minf=26176375
 With request-based IO path:
  seq-read  : io=2048.0MB, bw=91074KB/s, iops=182147 , runt= 23027msec
  seq-write : io=2048.0MB, bw=80725KB/s, iops=161449 , runt= 25979msec
  rand-read : io=3095.7MB, bw=92106KB/s, iops=184211 , runt= 34416msec
  rand-write: io=3095.7MB, bw=82815KB/s, iops=165630 , runt= 38277msec
    clat (usec): min=0 , max=1932.4K, avg=77824.17, stdev=170339.49
    clat (usec): min=0 , max=2510.2K, avg=78023.96, stdev=146949.15
    clat (usec): min=0 , max=3037.2K, avg=74746.53, stdev=128498.27
    clat (usec): min=0 , max=1363.4K, avg=89830.75, stdev=114279.68
  cpu : usr=53.28%, sys=724.19%, ctx=37988895, majf=17531, minf=23577622
  cpu : usr=49.03%, sys=633.20%, ctx=205935380, majf=18197, minf=27288959
  cpu : usr=55.78%, sys=722.40%, ctx=101525058, majf=19273, minf=28067082
  cpu : usr=56.55%, sys=690.83%, ctx=228205022, majf=18039, minf=26551985

2) Fio test is performed in a 8 vcpu guest with Fusion-IO based guest using
kvm tool.

Short version:
 With bio-based IO path, sequential read/write, random read/write
 IOPS boost         : 11%, 11%, 13%, 10%
 Latency improvement: 10%, 10%, 12%, 10%
Long Version:
 With bio-based IO path:
  read : io=2048.0MB, bw=58920KB/s, iops=117840 , runt= 35593msec
  write: io=2048.0MB, bw=64308KB/s, iops=128616 , runt= 32611msec
  read : io=3095.7MB, bw=59633KB/s, iops=119266 , runt= 53157msec
  write: io=3095.7MB, bw=62993KB/s, iops=125985 , runt= 50322msec
    clat (usec): min=0 , max=1284.3K, avg=128109.01, stdev=71513.29
    clat (usec): min=94 , max=962339 , avg=116832.95, stdev=65836.80
    clat (usec): min=0 , max=1846.6K, avg=128509.99, stdev=89575.07
    clat (usec): min=0 , max=2256.4K, avg=121361.84, stdev=82747.25
  cpu : usr=56.79%, sys=421.70%, ctx=147335118, majf=21080, minf=19852517
  cpu : usr=61.81%, sys=455.53%, ctx=143269950, majf=16027, minf=24800604
  cpu : usr=63.10%, sys=455.38%, ctx=178373538, majf=16958, minf=24822612
  cpu : usr=62.04%, sys=453.58%, ctx=226902362, majf=16089, minf=23278105
 With request-based IO path:
  read : io=2048.0MB, bw=52896KB/s, iops=105791 , runt= 39647msec
  write: io=2048.0MB, bw=57856KB/s, iops=115711 , runt= 36248msec
  read : io=3095.7MB, bw=52387KB/s, iops=104773 , runt= 60510msec
  write: io=3095.7MB, bw=57310KB/s, iops=114619 , runt= 55312msec
    clat (usec): min=0 , max=1532.6K, avg=142085.62, stdev=109196.84
    clat (usec): min=0 , max=1487.4K, avg=129110.71, stdev=114973.64
    clat (usec): min=0 , max=1388.6K, avg=145049.22, stdev=107232.55
    clat (usec): min=0 , max=1465.9K, avg=133585.67, stdev=110322.95
  cpu : usr=44.08%, sys=590.71%, ctx=451812322, majf=14841, minf=17648641
  cpu : usr=48.73%, sys=610.78%, ctx=418953997, majf=22164, minf=26850689
  cpu : usr=45.58%, sys=581.16%, ctx=714079216, majf=21497, minf=22558223
  cpu : usr=48.40%, sys=599.65%, ctx=656089423, majf=16393, minf=23824409

3) Fio test is performed in a 8 vcpu guest with normal SATA based guest
using kvm tool.

Short version:
 With bio-based IO path, sequential read/write, random read/write
 IOPS boost         : -10%, -10%, 4.4%, 0.5%
 Latency improvement: -12%, -15%, 2.5%, 0.8%
Long Version:
 With bio-based IO path:
  read : io=124812KB, bw=36537KB/s, iops=9060 , runt=  3416msec
  write: io=169180KB, bw=24406KB/s, iops=6065 , runt=  6932msec
  read : io=256200KB, bw=2089.3KB/s, iops=520 , runt=122630msec
  write: io=257988KB, bw=1545.7KB/s, iops=384 , runt=166910msec
    clat (msec): min=1 , max=1527 , avg=28.06, stdev=89.54
    clat (msec): min=2 , max=344 , avg=41.12, stdev=38.70
    clat (msec): min=8 , max=1984 , avg=490.63, stdev=207.28
    clat (msec): min=33 , max=4131 , avg=659.19, stdev=304.71
  cpu          : usr=4.85%, sys=17.15%, ctx=31593, majf=0, minf=7
  cpu          : usr=3.04%, sys=11.45%, ctx=39377, majf=0, minf=0
  cpu          : usr=0.47%, sys=1.59%, ctx=262986, majf=0, minf=16
  cpu          : usr=0.47%, sys=1.46%, ctx=337410, majf=0, minf=0

 With request-based IO path:
  read : io=150120KB, bw=40420KB/s, iops=10037 , runt=  3714msec
  write: io=194932KB, bw=27029KB/s, iops=6722 , runt=  7212msec
  read : io=257136KB, bw=2001.1KB/s, iops=498 , runt=128443msec
  write: io=258276KB, bw=1537.2KB/s, iops=382 , runt=168028msec
    clat (msec): min=1 , max=1542 , avg=24.84, stdev=32.45
    clat (msec): min=3 , max=628 , avg=35.62, stdev=39.71
    clat (msec): min=8 , max=2540 , avg=503.28, stdev=236.97
    clat (msec): min=41 , max=4398 , avg=653.88, stdev=302.61
  cpu          : usr=3.91%, sys=15.75%, ctx=26968, majf=0, minf=23
  cpu          : usr=2.50%, sys=10.56%, ctx=19090, majf=0, minf=0
  cpu          : usr=0.16%, sys=0.43%, ctx=20159, majf=0, minf=16
  cpu          : usr=0.18%, sys=0.53%, ctx=81364, majf=0, minf=0

How to use:
-----------------------------
Add 'virtio_blk.use_bio=1' to kernel cmdline or 'modprobe virtio_blk
use_bio=1' to enable ->make_request_fn() based I/O path.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio: console: fix error handling in init() function
Alexey Khoroshilov [Sat, 1 Sep 2012 19:49:37 +0000 (23:49 +0400)]
virtio: console: fix error handling in init() function

If register_virtio_driver() fails, virtio-ports class is not destroyed.
The patch adds error handling of register_virtio_driver().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotools: Fix pthread flag for Makefile of trace-agent used by virtio-trace
Yoshihiro YUNOMAE [Tue, 4 Sep 2012 00:53:39 +0000 (09:53 +0900)]
tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace

pthread flag should not be -lpthread but -pthread using gcc. The -lpthread
links the external multithread library. On the other hand, the -pthread manages
both the gcc's preprocessor and linker to be able to compile with pthread.

Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotools: Add guest trace agent as a user tool
Yoshihiro YUNOMAE [Thu, 9 Aug 2012 12:31:30 +0000 (21:31 +0900)]
tools: Add guest trace agent as a user tool

This patch adds a user tool, "trace agent" for sending trace data of a guest to
a Host in low overhead. This agent has the following functions:
 - splice a page of ring-buffer to read_pipe without memory copying
 - splice the page from write_pipe to virtio-console without memory copying
 - write trace data to stdout by using -o option
 - controlled by start/stop orders from a Host

Changes in v2:
 - Cleanup (change fprintf() to pr_err() and an include guard)

Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio/console: Allocate scatterlist according to the current pipe size
Masami Hiramatsu [Thu, 9 Aug 2012 12:31:20 +0000 (21:31 +0900)]
virtio/console: Allocate scatterlist according to the current pipe size

Allocate scatterlist according to the current pipe size.
This allows splicing bigger buffer if the pipe size has
been changed by fcntl.

Changes in v2:
 - Just a minor fix for avoiding a confliction with previous patch.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoftrace: Allow stealing pages from pipe buffer
Masami Hiramatsu [Thu, 9 Aug 2012 12:31:10 +0000 (21:31 +0900)]
ftrace: Allow stealing pages from pipe buffer

Use generic steal operation on pipe buffer to allow stealing
ring buffer's read page from pipe buffer.

Note that this could reduce the performance of splice on the
splice_write side operation without affinity setting.
Since the ring buffer's read pages are allocated on the
tracing-node, but the splice user does not always execute
splice write side operation on the same node. In this case,
the page will be accessed from the another node.
Thus, it is strongly recommended to assign the splicing
thread to corresponding node.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio/console: Wait until the port is ready on splice
Masami Hiramatsu [Thu, 9 Aug 2012 12:31:00 +0000 (21:31 +0900)]
virtio/console: Wait until the port is ready on splice

Wait if the port is not connected or full on splice
like as write is doing.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio/console: Add a failback for unstealable pipe buffer
Masami Hiramatsu [Thu, 9 Aug 2012 12:30:50 +0000 (21:30 +0900)]
virtio/console: Add a failback for unstealable pipe buffer

Add a failback memcpy path for unstealable pipe buffer.
If buf->ops->steal() fails, virtio-serial tries to
copy the page contents to an allocated page, instead
of just failing splice().

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agovirtio/console: Add splice_write support
Masami Hiramatsu [Thu, 9 Aug 2012 12:30:39 +0000 (21:30 +0900)]
virtio/console: Add splice_write support

Enable to use splice_write from pipe to virtio-console port.
This steals pages from pipe and directly send it to host.

Note that this may accelerate only the guest to host path.

Changes in v2:
 - Use GFP_KERNEL instead of GFP_ATOMIC in syscall context function.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agomodule: wait when loading a module which is currently initializing.
Rusty Russell [Thu, 20 Sep 2012 00:14:50 +0000 (10:14 +1000)]
module: wait when loading a module which is currently initializing.

The original module-init-tools module loader used a fnctl lock on the
.ko file to avoid attempts to simultaneously load a module.
Unfortunately, you can't get an exclusive fcntl lock on a read-only
fd, making this not work for read-only mounted filesystems.
module-init-tools has a hacky sleep-and-loop for this now.

It's not that hard to wait in the kernel, and only return -EEXIST once
the first module has finished loading (or continue loading the module
if the first one failed to initialize for some reason).  It's also
consistent with what we do for dependent modules which are still loading.

Suggested-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agomodule: fix symbol waiting when module fails before init
Rusty Russell [Thu, 20 Sep 2012 00:14:49 +0000 (10:14 +1000)]
module: fix symbol waiting when module fails before init

We use resolve_symbol_wait(), which blocks if the module containing
the symbol is still loading.  However:

1) The module_wq we use is only woken after calling the modules' init
   function, but there are other failure paths after the module is
   placed in the linked list where we need to do the same thing.

2) wake_up() only wakes one waiter, and our waitqueue is shared by all
   modules, so we need to wake them all.

3) wake_up_all() doesn't imply a memory barrier: I feel happier calling
   it after we've grabbed and dropped the module_mutex, not just after
   the state assignment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>