1. 30 7月, 2015 2 次提交
    • M
      dm cache: fix device destroy hang due to improper prealloc_used accounting · 795e633a
      Mike Snitzer 提交于
      Commit 665022d7 ("dm cache: avoid calls to prealloc_free_structs() if
      possible") introduced a regression that caused the removal of a DM cache
      device to hang in cache_postsuspend()'s call to wait_for_migrations()
      with the following stack trace:
      
        [<ffffffff81651457>] schedule+0x37/0x80
        [<ffffffffa041e21b>] cache_postsuspend+0xbb/0x470 [dm_cache]
        [<ffffffff810ba970>] ? prepare_to_wait_event+0xf0/0xf0
        [<ffffffffa0006f77>] dm_table_postsuspend_targets+0x47/0x60 [dm_mod]
        [<ffffffffa0001eb5>] __dm_destroy+0x215/0x250 [dm_mod]
        [<ffffffffa0004113>] dm_destroy+0x13/0x20 [dm_mod]
        [<ffffffffa00098cd>] dev_remove+0x10d/0x170 [dm_mod]
        [<ffffffffa00097c0>] ? dev_suspend+0x240/0x240 [dm_mod]
        [<ffffffffa0009f85>] ctl_ioctl+0x255/0x4d0 [dm_mod]
        [<ffffffff8127ac00>] ? SYSC_semtimedop+0x280/0xe10
        [<ffffffffa000a213>] dm_ctl_ioctl+0x13/0x20 [dm_mod]
        [<ffffffff811fd432>] do_vfs_ioctl+0x2d2/0x4b0
        [<ffffffff81117d5f>] ? __audit_syscall_entry+0xaf/0x100
        [<ffffffff81022636>] ? do_audit_syscall_entry+0x66/0x70
        [<ffffffff811fd689>] SyS_ioctl+0x79/0x90
        [<ffffffff81023e58>] ? syscall_trace_leave+0xb8/0x110
        [<ffffffff81654f6e>] entry_SYSCALL_64_fastpath+0x12/0x71
      
      Fix this by accounting for the call to prealloc_data_structs()
      immediately _before_ the call as opposed to after.  This is needed
      because it is possible to break out of the control loop after the call
      to prealloc_data_structs() but before prealloc_used was set to true.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      795e633a
    • M
      Revert "dm cache: do not wake_worker() in free_migration()" · 3508e659
      Mike Snitzer 提交于
      This reverts commit 386cb7cd.
      
      Taking the wake_worker() out of free_migration() will slow writeback
      dramatically, and hence adaptability.
      
      Say we have 10k blocks that need writing back, but are only able to
      issue 5 concurrently due to the migration bandwidth: it's imperative
      that we wake_worker() immediately after migration completion; waiting
      for the next 1 second wake up (via do_waker) means it'll take a long
      time to write that all back.
      Reported-by: NJoe Thornber <ejt@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      3508e659
  2. 28 7月, 2015 2 次提交
    • R
      cpufreq: Avoid attempts to create duplicate symbolic links · 559ed407
      Rafael J. Wysocki 提交于
      After commit 87549141 (cpufreq: Stop migrating sysfs files on
      hotplug) there is a problem with CPUs that share cpufreq policy
      objects with other CPUs and are initially offline.
      
      Say CPU1 shares a policy with CPU0 which is online and is registered
      first.  As part of the registration process, cpufreq_add_dev() is
      called for it.  It creates the policy object and a symbolic link
      to it from the CPU1's sysfs directory.  If CPU1 is registered
      subsequently and it is offline at that time, cpufreq_add_dev() will
      attempt to create a symbolic link to the policy object for it, but
      that link is present already, so a warning about that will be
      triggered.
      
      To avoid that warning, make cpufreq use an additional CPU mask
      containing related CPUs that are actually present for each policy
      object.  That mask is initialized when the policy object is populated
      after its creation (for the first online CPU using it) and it includes
      CPUs from the "policy CPUs" mask returned by the cpufreq driver's
      ->init() callback that are physically present at that time.  Symbolic
      links to the policy are created only for the CPUs in that mask.
      
      If cpufreq_add_dev() is invoked for an offline CPU, it checks the
      new mask and only creates the symlink if the CPU was not in it (the
      CPU is added to the mask at the same time).
      
      In turn, cpufreq_remove_dev() drops the given CPU from the new mask,
      removes its symlink to the policy object and returns, unless it is
      the CPU owning the policy object.  In that case, the policy object
      is moved to a new CPU's sysfs directory or deleted if the CPU being
      removed was the last user of the policy.
      
      While at it, notice that cpufreq_remove_dev() can't fail, because
      its return value is ignored, so make it ignore return values from
      __cpufreq_remove_dev_prepare() and __cpufreq_remove_dev_finish()
      and prevent these functions from aborting on errors returned by
      __cpufreq_governor().  Also drop the now unused sif argument from
      them.
      
      Fixes: 87549141 (cpufreq: Stop migrating sysfs files on hotplug)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reported-and-tested-by: NRussell King <linux@arm.linux.org.uk>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      559ed407
    • M
      ACPI / PM: Use target_state to set the device power state · 71b65445
      Mika Westerberg 提交于
      Commit 20dacb71 ("ACPI / PM: Rework device power management to follow
      ACPI 6") changed the device power management to use D3hot if the device
      in question does not have _PR3 method even if D3cold was requested by the
      caller.
      
      However, if the device has _PR3 device->power.state is also set to D3hot
      instead of D3Cold after power resources have been turned off because
      device->power.state will be assigned from "state" instead of
      "target_state".
      
      Next time the device is transitioned to D0, acpi_power_transition() will
      find that the current power state of the device is D3hot instead of D3cold
      which causes it to power down all resources required for the current
      (wrong) state D3hot.
      
      Below is a simplified ASL example of a real touch panel device which
      triggers the problem:
      
        Scope (TPL1)
        {
            Name (_PR0, Package (1) { \_SB.PCI0.I2C1.PXTC })
            Name (_PR3, Package (1) { \_SB.PCI0.I2C1.PXTC })
            ...
        }
      
      In both D0 and D3hot the same power resource is required. However, when
      acpi_power_transition() turns off power resources required for D3hot (as
      the device is transitioned to D0) it powers down PXTC which then makes the
      device to lose its power.
      
      Fix this by assigning "target_state" to the device power state instead of
      "state" that is always D3hot even for devices with valid _PR3.
      
      Fixes: 20dacb71 (ACPI / PM: Rework device power management to follow ACPI 6)
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      71b65445
  3. 27 7月, 2015 8 次提交
  4. 26 7月, 2015 2 次提交
  5. 25 7月, 2015 22 次提交
  6. 24 7月, 2015 4 次提交
    • D
      RDMA/ocrdma: update ocrdma module license string · b8f5595e
      Devesh Sharma 提交于
      Change module_license from "GPL" to "Dual BSD/GPL"
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Duan Jiong <duanj.fnst@cn.fujitsu.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
      Cc: Moni Shoua <monis@mellanox.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Li RongQing <roy.qing.li@gmail.com>
      Cc: Devendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      b8f5595e
    • D
      RDMA/ocrdma: update ocrdma license to dual-license · 71ee6730
      Devesh Sharma 提交于
      Change of license from GPLv2 to dual-license (GPLv2 and BSD 2-Clause)
      
      All contributors were contacted off-list and permission to make this
      change was received.  The complete list of contributors are Cc:ed here.
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Duan Jiong <duanj.fnst@cn.fujitsu.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
      Cc: Moni Shoua <monis@mellanox.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Li RongQing <roy.qing.li@gmail.com>
      Cc: Devendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      71ee6730
    • J
      IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM · efc1eedb
      Jason Gunthorpe 提交于
      If the above is turned off then ipoib_cm_dev_init unconditionally
      returns ENOSYS, and the newly added error handling in
      0b3957 prevents ipoib from coming up at all:
      
      kernel: mlx4_0: ipoib_transport_dev_init failed
      kernel: mlx4_0: failed to initialize port 1 (ret = -12)
      
      Fixes: 0b39578b (IB/ipoib: Use dedicated workqueues per interface)
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      efc1eedb
    • S
      RDMA/cxgb3: fail get_dma_mr on 64 bit arches · 49fa63d8
      Steve Wise 提交于
      T3 HW only supports 32 bit MRs.  If the system uses 64 bit memory
      addresses, then a registered 32 bit MR will wrap and write to the
      wrong memory when used with addresses > 4GB.  To prevent this,
      simply fail to allocate an MR on 64 bit machines (other means
      of registering memory are still available and software can still
      work, we just don't allow this means of memory registration).
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      49fa63d8