]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 06:03:19 +0000 (16:03 +1000)]
Merge remote-tracking branch 'workqueues/for-next'

11 years agoMerge remote-tracking branch 'xen-tip/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 06:03:15 +0000 (16:03 +1000)]
Merge remote-tracking branch 'xen-tip/linux-next'

11 years agoMerge remote-tracking branch 'kvm-ppc/kvm-ppc-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:56:16 +0000 (15:56 +1000)]
Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'

Conflicts:
mm/Kconfig

11 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:48:02 +0000 (15:48 +1000)]
Merge remote-tracking branch 'kvm/linux-next'

11 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Fri, 2 Aug 2013 05:39:44 +0000 (15:39 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'

11 years agoMerge remote-tracking branch 'ftrace/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:38:08 +0000 (15:38 +1000)]
Merge remote-tracking branch 'ftrace/for-next'

11 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Fri, 2 Aug 2013 05:29:51 +0000 (15:29 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

11 years agoMerge remote-tracking branch 'spi/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:27:58 +0000 (15:27 +1000)]
Merge remote-tracking branch 'spi/for-next'

11 years agoMerge remote-tracking branch 'devicetree/devicetree/next'
Stephen Rothwell [Fri, 2 Aug 2013 05:24:51 +0000 (15:24 +1000)]
Merge remote-tracking branch 'devicetree/devicetree/next'

11 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:23:17 +0000 (15:23 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

11 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:15:01 +0000 (15:15 +1000)]
Merge remote-tracking branch 'trivial/for-next'

11 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Fri, 2 Aug 2013 05:10:34 +0000 (15:10 +1000)]
Merge remote-tracking branch 'selinux/master'

Conflicts:
security/selinux/hooks.c

11 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Fri, 2 Aug 2013 05:05:44 +0000 (15:05 +1000)]
Merge remote-tracking branch 'security/next'

11 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:04:05 +0000 (15:04 +1000)]
Merge remote-tracking branch 'regulator/for-next'

11 years agoMerge remote-tracking branch 'fbdev/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:02:25 +0000 (15:02 +1000)]
Merge remote-tracking branch 'fbdev/for-next'

11 years agoMerge remote-tracking branch 'mfd-lj/for-mfd-next'
Stephen Rothwell [Fri, 2 Aug 2013 05:00:48 +0000 (15:00 +1000)]
Merge remote-tracking branch 'mfd-lj/for-mfd-next'

11 years agoMerge remote-tracking branch 'mfd/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:59:12 +0000 (14:59 +1000)]
Merge remote-tracking branch 'mfd/master'

11 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:57:34 +0000 (14:57 +1000)]
Merge remote-tracking branch 'md/for-next'

11 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:55:56 +0000 (14:55 +1000)]
Merge remote-tracking branch 'slab/for-next'

11 years agoMerge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:55:52 +0000 (14:55 +1000)]
Merge remote-tracking branch 'kgdb/kgdb-next'

11 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:54:16 +0000 (14:54 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

11 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:54:04 +0000 (14:54 +1000)]
Merge remote-tracking branch 'block/for-next'

11 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:49:33 +0000 (14:49 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

11 years agoMerge remote-tracking branch 'virtio/virtio-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:47:56 +0000 (14:47 +1000)]
Merge remote-tracking branch 'virtio/virtio-next'

11 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:46:12 +0000 (14:46 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

11 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:44:36 +0000 (14:44 +1000)]
Merge remote-tracking branch 'sound/for-next'

11 years agoMerge remote-tracking branch 'drm-intel/for-linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:42:53 +0000 (14:42 +1000)]
Merge remote-tracking branch 'drm-intel/for-linux-next'

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

11 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:33:36 +0000 (14:33 +1000)]
Merge remote-tracking branch 'drm/drm-next'

Conflicts:
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/qxl/qxl_release.c

11 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:18:43 +0000 (14:18 +1000)]
Merge remote-tracking branch 'crypto/master'

11 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:17:07 +0000 (14:17 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

11 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 04:15:29 +0000 (14:15 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

11 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:13:53 +0000 (14:13 +1000)]
Merge remote-tracking branch 'bluetooth/master'

11 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:11:48 +0000 (14:11 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
drivers/net/ethernet/broadcom/Kconfig

11 years agoMerge remote-tracking branch 'ipsec-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:10:06 +0000 (14:10 +1000)]
Merge remote-tracking branch 'ipsec-next/master'

11 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Fri, 2 Aug 2013 04:04:36 +0000 (14:04 +1000)]
Merge remote-tracking branch 'net-next/master'

11 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Fri, 2 Aug 2013 04:00:14 +0000 (14:00 +1000)]
Merge remote-tracking branch 'slave-dma/next'

11 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:58:38 +0000 (13:58 +1000)]
Merge remote-tracking branch 'dlm/next'

11 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:57:02 +0000 (13:57 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

11 years agoMerge remote-tracking branch 'idle/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:55:20 +0000 (13:55 +1000)]
Merge remote-tracking branch 'idle/next'

11 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:47:11 +0000 (13:47 +1000)]
Merge remote-tracking branch 'pm/linux-next'

11 years agoMerge remote-tracking branch 'libata/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:45:26 +0000 (13:45 +1000)]
Merge remote-tracking branch 'libata/for-next'

11 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:43:47 +0000 (13:43 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

11 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:41:56 +0000 (13:41 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

11 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:40:21 +0000 (13:40 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

11 years agoMerge branch 'jdelvare-hwmon/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:38:45 +0000 (13:38 +1000)]
Merge branch 'jdelvare-hwmon/master'

11 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:37:05 +0000 (13:37 +1000)]
Merge remote-tracking branch 'hid/for-next'

11 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Fri, 2 Aug 2013 03:35:29 +0000 (13:35 +1000)]
Merge remote-tracking branch 'pci/next'

11 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:29:34 +0000 (13:29 +1000)]
Merge remote-tracking branch 'vfs/for-next'

Conflicts:
fs/ext4/namei.c

11 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:27:53 +0000 (13:27 +1000)]
Merge remote-tracking branch 'xfs/for-next'

11 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:26:18 +0000 (13:26 +1000)]
Merge remote-tracking branch 'v9fs/for-next'

11 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:24:10 +0000 (13:24 +1000)]
Merge remote-tracking branch 'ocfs2/linux-next'

11 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:22:35 +0000 (13:22 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

11 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 03:21:01 +0000 (13:21 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

11 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:19:03 +0000 (13:19 +1000)]
Merge remote-tracking branch 'logfs/master'

11 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Fri, 2 Aug 2013 03:17:28 +0000 (13:17 +1000)]
Merge remote-tracking branch 'gfs2/master'

11 years agoMerge remote-tracking branch 'f2fs/dev'
Stephen Rothwell [Fri, 2 Aug 2013 03:15:54 +0000 (13:15 +1000)]
Merge remote-tracking branch 'f2fs/dev'

11 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Fri, 2 Aug 2013 02:40:08 +0000 (12:40 +1000)]
Merge remote-tracking branch 'ext3/for_next'

11 years agoMerge remote-tracking branch 'cifs/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:38:32 +0000 (12:38 +1000)]
Merge remote-tracking branch 'cifs/for-next'

11 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:36:59 +0000 (12:36 +1000)]
Merge remote-tracking branch 'ceph/master'

11 years agoMerge remote-tracking branch 'btrfs/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:36:57 +0000 (12:36 +1000)]
Merge remote-tracking branch 'btrfs/next'

11 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:35:22 +0000 (12:35 +1000)]
Merge remote-tracking branch 'tile/master'

11 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Fri, 2 Aug 2013 02:33:48 +0000 (12:33 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

Conflicts:
arch/sh/kernel/cpu/sh2a/Makefile
include/linux/serial_sci.h

11 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Fri, 2 Aug 2013 02:32:13 +0000 (12:32 +1000)]
Merge remote-tracking branch 's390/features'

11 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:30:36 +0000 (12:30 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

11 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:29:04 +0000 (12:29 +1000)]
Merge remote-tracking branch 'microblaze/next'

11 years agoMerge remote-tracking branch 'metag/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:27:32 +0000 (12:27 +1000)]
Merge remote-tracking branch 'metag/for-next'

11 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:26:00 +0000 (12:26 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Fri, 2 Aug 2013 02:24:28 +0000 (12:24 +1000)]
Merge remote-tracking branch 'ia64/next'

Conflicts:
arch/ia64/configs/generic_defconfig
arch/ia64/configs/gensparse_defconfig
arch/ia64/configs/tiger_defconfig
arch/ia64/configs/xen_domu_defconfig

11 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:22:54 +0000 (12:22 +1000)]
Merge remote-tracking branch 'cris/for-next'

Conflicts:
arch/cris/arch-v32/drivers/Kconfig

11 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:22:47 +0000 (12:22 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:21:10 +0000 (12:21 +1000)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Fri, 2 Aug 2013 02:19:37 +0000 (12:19 +1000)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'drm-intel-fixes/drm-intel-fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:28 +0000 (12:14 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/drm-intel-fixes'

11 years agoMerge remote-tracking branch 'rr-fixes/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:27 +0000 (12:14 +1000)]
Merge remote-tracking branch 'rr-fixes/fixes'

11 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:20 +0000 (12:14 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

11 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:18 +0000 (12:14 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:17 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:16 +0000 (12:14 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:16 +0000 (12:14 +1000)]
Merge remote-tracking branch 'sparc/master'

11 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:15 +0000 (12:14 +1000)]
Merge remote-tracking branch 'powerpc-merge/merge'

11 years agoMerge remote-tracking branch 'metag-fixes/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:14 +0000 (12:14 +1000)]
Merge remote-tracking branch 'metag-fixes/fixes'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 2 Aug 2013 02:14:13 +0000 (12:14 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'origin/master'
Stephen Rothwell [Fri, 2 Aug 2013 02:05:59 +0000 (12:05 +1000)]
Merge remote-tracking branch 'origin/master'

11 years agoesp_scsi: Fix tag state corruption when autosensing.
David S. Miller [Fri, 2 Aug 2013 01:08:34 +0000 (18:08 -0700)]
esp_scsi: Fix tag state corruption when autosensing.

Meelis Roos reports a crash in esp_free_lun_tag() in the presense
of a disk which has died.

The issue is that when we issue an autosense command, we do so by
hijacking the original command that caused the check-condition.

When we do so we clear out the ent->tag[] array when we issue it via
find_and_prep_issuable_command().  This is so that the autosense
command is forced to be issued non-tagged.

That is problematic, because it is the value of ent->tag[] which
determines whether we issued the original scsi command as tagged
vs. non-tagged (see esp_alloc_lun_tag()).

And that, in turn, is what trips up the sanity checks in
esp_free_lun_tag().  That function needs the original ->tag[] values
in order to free up the tag slot properly.

Fix this by remembering the original command's tag values, and
having esp_alloc_lun_tag() and esp_free_lun_tag() use them.

Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'bond_rcu'
David S. Miller [Thu, 1 Aug 2013 23:42:08 +0000 (16:42 -0700)]
Merge branch 'bond_rcu'

Nikolay Aleksandrov says:

====================
 This patchset aims to lay the groundwork, and do the initial conversion to
RCUism. I decided that it'll be much better to make the bonding RCU
conversion gradual, so patches can be reviewed and tested better rather
than having one huge patch (which I did in the beginning, before this).
The first patch is straightforward and it converts the bonding to the
standard list API, simplifying a lot of code, removing unnecessary local
variables and allowing to use the nice rculist API later. It also takes
care of some minor styling issues (re-arranging local variables longest ->
shortest, removing brackets for single statement if/else, leaving new line
before return statement etc.).
 The second patch simplifies the conversion by removing unnecessary
read_lock(&bond->curr_slave_lock) in xmit paths that are to be converted
later, because we only care if the pointer is NULL or a slave there, since
we already have bond->lock the slave can't go away.
 The third patch simplifies the broadcast xmit function by removing
the use of curr_active_slave and converting to standard list API. Also this
design of the broadcast xmit function avoids a subtle double packet tx race
when converted to RCU.
 The fourth patch factors out the code that transmits skb through a slave
with given id (i.e. rr_tx_counter in rr mode, hashed value in xor mode) and
simplifies the active-backup xmit path because bond_dev_queue_xmit always
consumes the skb. The new bond_xmit_slave_id function is used in rr and xor
modes currently, but the plans are to use it in 3ad mode as well thus it's
made global. I've left the function prototype to be 81 chars so I wouldn't
break it, if this is an issue I can always break it in more lines.
 The fifth patch introduces RCU by converting attach/detach and release to
RCU. It also converts dereferencing of curr_active_slave to rcu_dereference
although it's not fully converted to RCU, that is needed for the converted
xmit paths. And it converts roundrobin, broadcast, xor and active-backup
xmit paths to RCU. The 3ad and ALB/TLB modes acquire read_lock(&bond->lock)
to make sure that no slave will be removed and to sync properly with
enslave and release as before.
 This way for the price of a little complexity, we'll be able to convert
individual parts of the bonding to RCU, and test them easier in the
process. If this patchset is accepted in some form, I'll post followups
in the next weeks that gradually convert the bonding to RCU and remove the
need for the rwlocks.
 For performance notes please refer to patch 5 (RCU conversion one).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: initial RCU conversion
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:51 +0000 (16:54 +0200)]
bonding: initial RCU conversion

This patch does the initial bonding conversion to RCU. After it the
following modes are protected by RCU alone: roundrobin, active-backup,
broadcast and xor. Modes ALB/TLB and 3ad still acquire bond->lock for
reading, and will be dealt with later. curr_active_slave needs to be
dereferenced via rcu in the converted modes because the only thing
protecting the slave after this patch is rcu_read_lock, so we need the
proper barrier for weakly ordered archs and to make sure we don't have
stale pointer. It's not tagged with __rcu yet because there's still work
to be done to remove the curr_slave_lock, so sparse will complain when
rcu_assign_pointer and rcu_dereference are used, but the alternative to use
rcu_dereference_protected would've created much bigger code churn which is
more difficult to test and review. That will be converted in time.

1. Active-backup mode
 1.1 Perf recording while doing iperf -P 4
  - old bonding: iperf spent 0.55% in bonding, system spent 0.29% CPU
                 in bonding
  - new bonding: iperf spent 0.29% in bonding, system spent 0.15% CPU
                 in bonding
 1.2. Bandwidth measurements
  - old bonding: 16.1 gbps consistently
  - new bonding: 17.5 gbps consistently

2. Round-robin mode
 2.1 Perf recording while doing iperf -P 4
  - old bonding: iperf spent 0.51% in bonding, system spent 0.24% CPU
                 in bonding
  - new bonding: iperf spent 0.16% in bonding, system spent 0.11% CPU
                 in bonding
 2.2 Bandwidth measurements
  - old bonding: 8 gbps (variable due to packet reorderings)
  - new bonding: 10 gbps (variable due to packet reorderings)

Of course the latency has improved in all converted modes, and moreover
while
doing enslave/release (since it doesn't affect tx anymore).

Also I've stress tested all modes doing enslave/release in a loop while
transmitting traffic.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: factor out slave id tx code and simplify xmit paths
Nikolay Aleksandrov [Thu, 1 Aug 2013 14:54:50 +0000 (16:54 +0200)]
bonding: factor out slave id tx code and simplify xmit paths

I factored out the tx xmit code which relies on slave id in
bond_xmit_slave_id. It is global because later it can be used also in
3ad mode xmit. Unnecessary obvious comments are removed. Active-backup
mode is simplified because bond_dev_queue_xmit always consumes the skb.
bond_xmit_xor becomes one line because of bond_xmit_slave_id.
bond_for_each_slave_from is not used in bond_xmit_slave_id because later
when RCU is used we can avoid important race condition by using standard
rculist routines.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: simplify broadcast_xmit function
Nikolay Aleksandrov [Thu, 1 Aug 2013 14:54:49 +0000 (16:54 +0200)]
bonding: simplify broadcast_xmit function

We don't need to start from the curr_active_slave as the frame will be
sent to all eligible slaves anyway, so we remove the unnecessary local
variables, checks and comments, and make it use the standard list API.
This has the nice side-effect that later when it's converted to RCU
a race condition will be avoided which could lead to double packet tx.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: remove unnecessary read_locks of curr_slave_lock
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:48 +0000 (16:54 +0200)]
bonding: remove unnecessary read_locks of curr_slave_lock

In all the cases we already hold bond->lock for reading, so the slave
can't get away and the check != NULL is sufficient. curr_active_slave
can still change after the read_lock is unlocked prior to use of the
dereferenced value, so there's no need for it. It either contains a
valid slave which we use (and can't get away), or it is NULL which is
checked.
In some places the read_lock of curr_slave_lock was left because we need
it not to change while performing some action (e.g. syncing current
active slave's addresses, sending ARP requests through the active slave)
such cases will be dealt with individually while converting to RCU.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: convert to list API and replace bond's custom list
nikolay@redhat.com [Thu, 1 Aug 2013 14:54:47 +0000 (16:54 +0200)]
bonding: convert to list API and replace bond's custom list

This patch aims to remove struct bonding's first_slave and struct
slave's next and prev pointers, and replace them with the standard Linux
list API. The old macros are converted to list API as well and some new
primitives are available now. The checks if there're slaves that used
slave_cnt have been replaced by the list_empty macro.
Also a few small style fixes, changing longest -> shortest line in local
variable declarations, leaving an empty line before return and removing
unnecessary brackets.
This is the first step to gradual RCU conversion.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: bump genid when delete/add address
fan.du [Thu, 1 Aug 2013 09:44:44 +0000 (17:44 +0800)]
ipv6: bump genid when delete/add address

Server           Client
2001:1::803/64  <-> 2001:1::805/64
2001:2::804/64  <-> 2001:2::806/64

Server side fib binary tree looks like this:

                                   (2001:/64)
                                   /
                                  /
                   ffff88002103c380
                 /                 \
     (2)        /                   \
 (2001::803/128)                     ffff880037ac07c0
                                    /               \
                                   /                 \  (3)
                      ffff880037ac0640               (2001::806/128)
                       /             \
             (1)      /               \
        (2001::804/128)               (2001::805/128)

Delete 2001::804/64 won't cause prefix route deleted as well as rt in (3)
destinate to 2001::806 with source address as 2001::804/64. That's because
2001::803/64 is still alive, which make onlink=1 in ipv6_del_addr, this is
where the substantial difference between same prefix configuration and
different prefix configuration :) So packet are still transmitted out to
2001::806 with source address as 2001::804/64.

So bump genid will clear rt in (3), and up layer protocol will eventually
find the right one for themselves.

This problem arised from the discussion in here:
http://marc.info/?l=linux-netdev&m=137404469219410&w=4

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomacvlan: handle set_promiscuity failures
Michael S. Tsirkin [Thu, 1 Aug 2013 10:50:10 +0000 (13:50 +0300)]
macvlan: handle set_promiscuity failures

It's quite unlikely that dev_set_promiscuity will fail,
but worth checking just in case.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomacvlan: better mode validation
Michael S. Tsirkin [Thu, 1 Aug 2013 10:43:19 +0000 (13:43 +0300)]
macvlan: better mode validation

macvlan passthrough mode is special: it's not possible to switch to or
from it through a netlink command.

But if you try, the command will succeed, which is
confusing.

Validate input and return error to user.

Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Thu, 1 Aug 2013 23:18:09 +0000 (20:18 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (65 commits)
  [media] stk1160: Build as a module if SND is m and audio support is selected
  [media] cx23885-video: fix two warnings
  [media] cx23885[v4]: Fix interrupt storm when enabling IR receiver
  [media] S2255: Removal of unnecessary videobuf_queue_is_busy
  [media] media: lirc: Allow lirc dev to talk to rc device
  [media] media: rc: Add rc_open/close and use count to rc_dev
  [media] coda: add CODA7541 decoding support
  [media] coda: split encoder specific parts out of device_run and irq_handler
  [media] coda: dynamic IRAM setup for decoder
  [media] cx23885: Fix TeVii S471 regression since introduction of ts2020
  [media] lirc: make transmit interface consistent
  [media] lirc: validate transmission ir data
  [media] rc: allowed_protos now is a bit field
  [media] redrat3: errors on unplug
  [media] DocBook: Fix typo in V4L2_CID_JPEG_COMPRESSION_QUALITY reference
  [media] V4L: Merge struct v4l2_async_subdev_list with struct v4l2_subdev
  [media] V4L: Rename subdev field of struct v4l2_async_notifier
  [media] V4L: Add V4L2_ASYNC_MATCH_OF subdev matching type
  [media] V4L: Rename v4l2_async_bus_* to v4l2_async_match_*
  [media] V4L: Drop bus_type check in v4l2-async match functions
  ...

11 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Thu, 1 Aug 2013 23:17:54 +0000 (20:17 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] em28xx: fix assignment of the eeprom data
  [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
  [media] usbtv: fix dependency
  [media] usbtv: Throw corrupted frames away
  [media] usbtv: Fix deinterlacing
  [media] v4l2: added missing mutex.h include to v4l2-ctrls.h
  [media] DocBook: upgrade media_api DocBook version to 4.2
  [media] ml86v7667: fix compile warning: 'ret' set but not used
  [media] s5p-g2d: Fix registration failure
  [media] media: coda: Fix DT driver data pointer for i.MX27
  [media] s5p-mfc: Fix input/output format reporting

11 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Thu, 1 Aug 2013 23:14:29 +0000 (16:14 -0700)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. It consists of two patches
by Fabio Estevam. Them first convert the flexcan driver to use
devm_ioremap_resource(), the second adds return value checking for
clk_prepare_enable().
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Revising locking scheme for MAC configuration
Yuval Mintz [Thu, 1 Aug 2013 14:30:59 +0000 (17:30 +0300)]
bnx2x: Revising locking scheme for MAC configuration

On very rare occasions, repeated load/unload stress test in the presence of
our storage driver (bnx2i/bnx2fc) causes a kernel panic in bnx2x code
(NULL pointer dereference). Stack traces indicate the issue happens during MAC
configuration; thorough code review showed that indeed several races exist
in which one thread can iterate over the list of configured MACs while another
deletes entries from the same list.

This patch adds a varient on the single-writer/Multiple-reader lock mechanism -
It utilizes an already exsiting bottom-half lock, using it so that Whenever
a writer is unable to continue due to the existence of another writer/reader,
it pends its request for future deliverance.
The writer / last readers will check for the existence of such requests and
perform them instead of the original initiator.
This prevents the writer from having to sleep while waiting for the lock
to be accessible, which might cause deadlocks given the locks already
held by the writer.

Another result of this patch is that setting of Rx Mode is now made in
sleepable context - Setting of Rx Mode is made under a bottom-half lock, which
was always nontrivial for the bnx2x driver, as the HW/FW configuration requires
wait for completions.
Since sleep was impossible (due to the sleepless-context), various mechanisms
were utilized to prevent the calling thread from sleep, but the truth was that
when the caller thread (i.e, the one calling ndo_set_rx_mode()) returned, the
Rx mode was still not set in HW/FW.

bnx2x_set_rx_mode() will now overtly schedule for the Rx changes to be
configured by the sp_rtnl_task which hold the RTNL lock and is sleepable
context.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotipc: fix oops when creating server socket fails
Ying Xue [Thu, 1 Aug 2013 12:29:18 +0000 (08:29 -0400)]
tipc: fix oops when creating server socket fails

When creation of TIPC internal server socket fails,
we get an oops with the following dump:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
PGD 13719067 PUD 12008067 PMD 0
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
Modules linked in: tipc(+)
CPU: 4 PID: 4340 Comm: insmod Not tainted 3.10.0+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
task: ffff880014360000 ti: ffff88001374c000 task.ti: ffff88001374c000
RIP: 0010:[<ffffffffa0011f49>]  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
RSP: 0018:ffff88001374dc98  EFLAGS: 00010292
RAX: 0000000000000000 RBX: ffff880012ac09d8 RCX: 0000000000000000
RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffff880014360000
RBP: ffff88001374dcb8 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0016fa0
R13: ffffffffa0017010 R14: ffffffffa0017010 R15: ffff880012ac09d8
FS:  0000000000000000(0000) GS:ffff880016600000(0063) knlGS:00000000f76668d0
CS:  0010 DS: 002b ES: 002b CR0: 000000008005003b
CR2: 0000000000000020 CR3: 0000000012227000 CR4: 00000000000006e0
Stack:
ffff88001374dcb8 ffffffffa0016fa0 0000000000000000 0000000000000001
ffff88001374dcf8 ffffffffa0012922 ffff88001374dce8 00000000ffffffea
ffffffffa0017100 0000000000000000 ffff8800134241a8 ffffffffa0017150
Call Trace:
[<ffffffffa0012922>] tipc_server_stop+0xa2/0x1b0 [tipc]
[<ffffffffa0009995>] tipc_subscr_stop+0x15/0x20 [tipc]
[<ffffffffa00130f5>] tipc_core_stop+0x1d/0x33 [tipc]
[<ffffffffa001f0d4>] tipc_init+0xd4/0xf8 [tipc]
[<ffffffffa001f000>] ? 0xffffffffa001efff
[<ffffffff8100023f>] do_one_initcall+0x3f/0x150
[<ffffffff81082f4d>] ? __blocking_notifier_call_chain+0x7d/0xd0
[<ffffffff810cc58a>] load_module+0x11aa/0x19c0
[<ffffffff810c8d60>] ? show_initstate+0x50/0x50
[<ffffffff8190311c>] ? retint_restore_args+0xe/0xe
[<ffffffff810cce79>] SyS_init_module+0xd9/0x110
[<ffffffff8190dc65>] sysenter_dispatch+0x7/0x1f
Code: 6c 24 70 4c 89 ef e8 b7 04 8f e1 8b 73 04 4c 89 e7 e8 7c 9e 32 e1 41 83 ac 24
b8 00 00 00 01 4c 89 ef e8 eb 0a 8f e1 48 8b 43 08 <4c> 8b 68 20 4d 8d a5 48 03 00
00 4c 89 e7 e8 04 05 8f e1 4c 89
RIP  [<ffffffffa0011f49>] tipc_close_conn+0x59/0xb0 [tipc]
RSP <ffff88001374dc98>
CR2: 0000000000000020
---[ end trace b02321f40e4269a3 ]---

We have the following call chain:

tipc_core_start()
    ret = tipc_subscr_start()
        ret = tipc_server_start(){
                  server->enabled = 1;
                  ret = tipc_open_listening_sock()
              }

I.e., the server->enabled flag is unconditionally set to 1, whatever
the return value of tipc_open_listening_sock().

This causes a crash when tipc_core_start() tries to clean up
resources after a failed initialization:

    if (ret == failed)
        tipc_subscr_stop()
            tipc_server_stop(){
                if (server->enabled)
                    tipc_close_conn(){
                        NULL reference of con->sock-sk
                        OOPS!
                }
            }

To avoid this, tipc_server_start() should only set server->enabled
to 1 in case of a succesful socket creation. In case of failure, it
should release all allocated resources before returning.

Problem introduced in commit c5fa7b3cf3cb22e4ac60485fc2dc187fe012910f
("tipc: introduce new TIPC server infrastructure") in v3.11-rc1.
Note that it won't be seen often; it takes a module load under memory
constrained conditions in order to trigger the failure condition.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: fix system hang due to fast igmp timer rescheduling
Nikolay Aleksandrov [Thu, 1 Aug 2013 09:51:42 +0000 (11:51 +0200)]
bonding: fix system hang due to fast igmp timer rescheduling

After commit 4aa5dee4d9 ("net: convert resend IGMP to notifier event")
we try to acquire rtnl in bond_resend_igmp_join_requests but it can be
scheduled with rtnl already held (e.g. when bond_change_active_slave is
called with rtnl) causing a loop of immediate reschedules + calls because
rtnl_trylock fails each time since it's being already held.
For me this issue leads to system hangs very easy:
modprobe bonding; ifconfig bond0 up; ifenslave bond0 eth0; rmmod
bonding;

The fix is to introduce a small (1 jiffy) delay which is enough for the
sections holding rtnl to finish without putting any strain on the system.
Also adjust the timer in bond_change_active_slave to be 1 jiffy, since
most of the time it's called with rtnl already held.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL
Cong Wang [Thu, 1 Aug 2013 03:10:25 +0000 (11:10 +0800)]
net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL

Eliezer renames several *ll_poll to *busy_poll, but forgets
CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.

Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>