1. 29 Sep, 2015 6 commits
    • Akinobu Mita's avatar
      blk-mq: fix deadlock when reading cpu_list · 60de074b
      Akinobu Mita authored
      CPU hotplug handling for blk-mq (blk_mq_queue_reinit) acquires
      all_q_mutex in blk_mq_queue_reinit_notify() and then removes sysfs
      entries by blk_mq_sysfs_unregister().  Removing sysfs entry needs to
      be blocked until the active reference of the kernfs_node to be zero.
      
      On the other hand, reading blk_mq_hw_sysfs_cpu sysfs entry (e.g.
      /sys/block/nullb0/mq/0/cpu_list) acquires all_q_mutex in
      blk_mq_hw_sysfs_cpus_show().
      
      If these happen at the same time, a deadlock can happen.  Because one
      can wait for the active reference to be zero with holding all_q_mutex,
      and the other tries to acquire all_q_mutex with holding the active
      reference.
      
      The reason that all_q_mutex is acquired in blk_mq_hw_sysfs_cpus_show()
      is to avoid reading an imcomplete hctx->cpumask.  Since reading sysfs
      entry for blk-mq needs to acquire q->sysfs_lock, we can avoid deadlock
      and reading an imcomplete hctx->cpumask by protecting q->sysfs_lock
      while hctx->cpumask is being updated.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Wanpeng Li <wanpeng.li@hotmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      60de074b
    • Akinobu Mita's avatar
      blk-mq: avoid inserting requests before establishing new mapping · 5778322e
      Akinobu Mita authored
      Notifier callbacks for CPU_ONLINE action can be run on the other CPU
      than the CPU which was just onlined.  So it is possible for the
      process running on the just onlined CPU to insert request and run
      hw queue before establishing new mapping which is done by
      blk_mq_queue_reinit_notify().
      
      This can cause a problem when the CPU has just been onlined first time
      since the request queue was initialized.  At this time ctx->index_hw
      for the CPU, which is the index in hctx->ctxs[] for this ctx, is still
      zero before blk_mq_queue_reinit_notify() is called by notifier
      callbacks for CPU_ONLINE action.
      
      For example, there is a single hw queue (hctx) and two CPU queues
      (ctx0 for CPU0, and ctx1 for CPU1).  Now CPU1 is just onlined and
      a request is inserted into ctx1->rq_list and set bit0 in pending
      bitmap as ctx1->index_hw is still zero.
      
      And then while running hw queue, flush_busy_ctxs() finds bit0 is set
      in pending bitmap and tries to retrieve requests in
      hctx->ctxs[0]->rq_list.  But htx->ctxs[0] is a pointer to ctx0, so the
      request in ctx1->rq_list is ignored.
      
      Fix it by ensuring that new mapping is established before onlined cpu
      starts running.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      5778322e
    • Akinobu Mita's avatar
      blk-mq: fix q->mq_usage_counter access race · 0e626368
      Akinobu Mita authored
      CPU hotplug handling for blk-mq (blk_mq_queue_reinit) accesses
      q->mq_usage_counter while freezing all request queues in all_q_list.
      On the other hand, q->mq_usage_counter is deinitialized in
      blk_mq_free_queue() before deleting the queue from all_q_list.
      
      So if CPU hotplug event occurs in the window, percpu_ref_kill() is
      called with q->mq_usage_counter which has already been marked dead,
      and it triggers warning.  Fix it by deleting the queue from all_q_list
      earlier than destroying q->mq_usage_counter.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      0e626368
    • Akinobu Mita's avatar
      blk-mq: Fix use after of free q->mq_map · a723bab3
      Akinobu Mita authored
      CPU hotplug handling for blk-mq (blk_mq_queue_reinit) updates
      q->mq_map by blk_mq_update_queue_map() for all request queues in
      all_q_list.  On the other hand, q->mq_map is released before deleting
      the queue from all_q_list.
      
      So if CPU hotplug event occurs in the window, invalid memory access
      can happen.  Fix it by releasing q->mq_map in blk_mq_release() to make
      it happen latter than removal from all_q_list.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Suggested-by: default avatarMing Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      a723bab3
    • Akinobu Mita's avatar
      blk-mq: fix sysfs registration/unregistration race · 4593fdbe
      Akinobu Mita authored
      There is a race between cpu hotplug handling and adding/deleting
      gendisk for blk-mq, where both are trying to register and unregister
      the same sysfs entries.
      
      null_add_dev
          --> blk_mq_init_queue
              --> blk_mq_init_allocated_queue
                  --> add to 'all_q_list' (*)
          --> add_disk
              --> blk_register_queue
                  --> blk_mq_register_disk (++)
      
      null_del_dev
          --> del_gendisk
              --> blk_unregister_queue
                  --> blk_mq_unregister_disk (--)
          --> blk_cleanup_queue
              --> blk_mq_free_queue
                  --> del from 'all_q_list' (*)
      
      blk_mq_queue_reinit
          --> blk_mq_sysfs_unregister (-)
          --> blk_mq_sysfs_register (+)
      
      While the request queue is added to 'all_q_list' (*),
      blk_mq_queue_reinit() can be called for the queue anytime by CPU
      hotplug callback.  But blk_mq_sysfs_unregister (-) and
      blk_mq_sysfs_register (+) in blk_mq_queue_reinit must not be called
      before blk_mq_register_disk (++) and after blk_mq_unregister_disk (--)
      is finished.  Because '/sys/block/*/mq/' is not exists.
      
      There has already been BLK_MQ_F_SYSFS_UP flag in hctx->flags which can
      be used to track these sysfs stuff, but it is only fixing this issue
      partially.
      
      In order to fix it completely, we just need per-queue flag instead of
      per-hctx flag with appropriate locking.  So this introduces
      q->mq_sysfs_init_done which is properly protected with all_q_mutex.
      
      Also, we need to ensure that blk_mq_map_swqueue() is called with
      all_q_mutex is held.  Since hctx->nr_ctx is reset temporarily and
      updated in blk_mq_map_swqueue(), so we should avoid
      blk_mq_register_hctx() seeing the temporary hctx->nr_ctx value
      in CPU hotplug handling or adding/deleting gendisk .
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      4593fdbe
    • Akinobu Mita's avatar
      blk-mq: avoid setting hctx->tags->cpumask before allocation · 1356aae0
      Akinobu Mita authored
      When unmapped hw queue is remapped after CPU topology is changed,
      hctx->tags->cpumask has to be set after hctx->tags is setup in
      blk_mq_map_swqueue(), otherwise it causes null pointer dereference.
      
      Fixes: f26cdc85 ("blk-mq: Shared tag enhancements")
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      1356aae0
  2. 23 Sep, 2015 3 commits
    • Keith Busch's avatar
      NVMe: Set affinity after allocating request queues · bda4e0fb
      Keith Busch authored
      The asynchronous namespace scanning caused affinity hints to be set before
      its tagset initialized, so there was no cpu mask to set the hint. This
      patch moves the affinity hint setting to after namespaces are scanned.
      Reported-by: default avatar김경산 <ks0204.kim@samsung.com>
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      bda4e0fb
    • Jens Axboe's avatar
      Merge branch 'stable/for-jens-4.3' of... · adbe734b
      Jens Axboe authored
      Merge branch 'stable/for-jens-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
      
      Konrad writes:
      
      It has one fix that should go in and also be put in stable tree (I've
      added the CC already).
      
      It is a fix for a memory leak that can exposed via using UEFI
      xen-blkfront driver.
      adbe734b
    • Roger Pau Monne's avatar
      xen/blkback: free requests on disconnection · f929d42c
      Roger Pau Monne authored
      This is due to  commit 86839c56
      "xen/block: add multi-page ring support"
      
      When using an guest under UEFI - after the domain is destroyed
      the following warning comes from blkback.
      
      ------------[ cut here ]------------
      WARNING: CPU: 2 PID: 95 at
      /home/julien/works/linux/drivers/block/xen-blkback/xenbus.c:274
      xen_blkif_deferred_free+0x1f4/0x1f8()
      Modules linked in:
      CPU: 2 PID: 95 Comm: kworker/2:1 Tainted: G        W       4.2.0 #85
      Hardware name: APM X-Gene Mustang board (DT)
      Workqueue: events xen_blkif_deferred_free
      Call trace:
      [<ffff8000000890a8>] dump_backtrace+0x0/0x124
      [<ffff8000000891dc>] show_stack+0x10/0x1c
      [<ffff8000007653bc>] dump_stack+0x78/0x98
      [<ffff800000097e88>] warn_slowpath_common+0x9c/0xd4
      [<ffff800000097f80>] warn_slowpath_null+0x14/0x20
      [<ffff800000557a0c>] xen_blkif_deferred_free+0x1f0/0x1f8
      [<ffff8000000ad020>] process_one_work+0x160/0x3b4
      [<ffff8000000ad3b4>] worker_thread+0x140/0x494
      [<ffff8000000b2e34>] kthread+0xd8/0xf0
      ---[ end trace 6f859b7883c88cdd ]---
      
      Request allocation has been moved to connect_ring, which is called every
      time blkback connects to the frontend (this can happen multiple times during
      a blkback instance life cycle). On the other hand, request freeing has not
      been moved, so it's only called when destroying the backend instance. Due to
      this mismatch, blkback can allocate the request pool multiple times, without
      freeing it.
      
      In order to fix it, move the freeing of requests to xen_blkif_disconnect to
      restore the symmetry between request allocation and freeing.
      Reported-by: default avatarJulien Grall <julien.grall@citrix.com>
      Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Tested-by: default avatarJulien Grall <julien.grall@citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: xen-devel@lists.xenproject.org
      CC: stable@vger.kernel.org # 4.2
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      f929d42c
  3. 22 Sep, 2015 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-4.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · bcee19f4
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "The threadgroup locking changes which went in during 4.2 devel cycle
        added write locking of a percpu_rwsem in cgroup task migration path;
        unfortunately, that involved expedited rcu syncing which turned out to
        be too slow and heavy for certain workloads.  The patchset which is
        dependent on this one didn't get committed during that devel cycle, so
        these two patches can be reverted safely.
      
        Oleg reworked percpu_rwsem for 4.4 so that the writer path is a lot
        lighter.  The reported issue goes away with Oleg's reworked
        percpu_rwsem and I'll reapply these patches on the for-4.4 branch so
        that they can land together with Oleg's changes"
      
      * 'for-4.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        Revert "sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem"
        Revert "cgroup: simplify threadgroup locking"
      bcee19f4
  4. 21 Sep, 2015 3 commits
  5. 20 Sep, 2015 10 commits
    • Linus Torvalds's avatar
      Linux 4.3-rc2 · 1f93e4a9
      Linus Torvalds authored
      1f93e4a9
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 99bc7215
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Three fixes and a resulting cleanup for -rc2:
      
         - Andre Przywara reported that he was seeing a warning with the new
           cast inside DMA_ERROR_CODE's definition, and fixed the incorrect
           use.
      
         - Doug Anderson noticed that kgdb causes a "scheduling while atomic"
           bug.
      
         - OMAP5 folk noticed that their Thumb-2 compiled X servers crashed
           when enabling support to cover ARMv6 CPUs due to a kernel bug
           leaking some conditional context into the signal handler"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
        ARM: 8437/1: dma-mapping: fix build warning with new DMA_ERROR_CODE definition
        ARM: get rid of needless #if in signal handling code
        ARM: fix Thumb2 signal handling when ARMv6 is enabled
      99bc7215
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.3-rc2' of... · 30ec5682
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This update contains 7 fixes for problems ranging from build failurs
        to incorrect error reporting"
      
      * tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: exec: revert to default emit rule
        selftests: change install command to rsync
        selftests: mqueue: simplify the Makefile
        selftests: mqueue: allow extra cflags
        selftests: rename jump label to static_keys
        selftests/seccomp: add support for s390
        seltests/zram: fix syntax error
      30ec5682
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 009884f3
      Linus Torvalds authored
      Pull power management and ACPI updates from Rafael Wysocki:
       "Included are: a somewhat late devfreq update which however is mostly
        fixes and cleanups with one new thing only (the PPMUv2 support on
        Exynos5433), an ACPI cpufreq driver fixup and two ACPI core cleanups
        related to preprocessor directives.
      
        Specifics:
      
         - Fix a memory allocation size in the devfreq core (Xiaolong Ye).
      
         - Fix a mistake in the exynos-ppmu DT binding (Javier Martinez
           Canillas).
      
         - Add support for PPMUv2 ((Platform Performance Monitoring Unit
           version 2.0) on the Exynos5433 SoCs (Chanwoo Choi).
      
         - Fix a type casting bug in the Exynos PPMU code (MyungJoo Ham).
      
         - Assorted devfreq code cleanups and optimizations (Javi Merino,
           MyungJoo Ham, Viresh Kumar).
      
         - Fix up the ACPI cpufreq driver to use a more lightweight way to get
           to its private data in the ->get() callback (Rafael J Wysocki).
      
         - Fix a CONFIG_ prefix bug in one of the ACPI drivers and make the
           ACPI subsystem use IS_ENABLED() instead of #ifdefs in function
           bodies (Sudeep Holla)"
      
      * tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in ->get()
        ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()
        ACPI: int340x_thermal: add missing CONFIG_ prefix
        PM / devfreq: Fix incorrect type issue.
        PM / devfreq: tegra: Update governor to use devfreq_update_stats()
        PM / devfreq: comments for get_dev_status usage updated
        PM / devfreq: drop comment about thermal setting max_freq
        PM / devfreq: cache the last call to get_dev_status()
        PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL)
        PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
        PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2
        PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433
        PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding
      009884f3
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d590b2d4
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A few driver fixes for tegra, rockchip, and st SoCs and a two-liner in
        the framework to avoid oops when get_parent ops return out of range
        values on tegra platforms"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        drivers: clk: st: Rename st_pll3200c32_407_c0_x into st_pll3200c32_cx_x
        clk: check for invalid parent index of orphans in __clk_init()
        clk: tegra: dfll: Properly protect OPP list
        clk: rockchip: add critical clock for rk3368
      d590b2d4
    • Linus Torvalds's avatar
      Merge tag 'led-fixes-for-v4.3-rc2' of... · e6827baf
      Linus Torvalds authored
      Merge tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED fixes from Jacek Anaszewski:
       - fix module autoload for six OF platform drivers (aat1290, bcm6328,
         bcm6358, ktd2692, max77693, ns2)
       - aat1290: add missing static modifier
       - ipaq-micro: add missing LEDS_CLASS dependency
       - lp55xx: correct Kconfig dependecy for f/w user helper
      
      * tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds:lp55xx: Correct Kconfig dependency for f/w user helper
        leds: leds-ipaq-micro: Add LEDS_CLASS dependency
        leds: aat1290: add 'static' modifier to init_mm_current_scale
        leds: leds-ns2: Fix module autoload for OF platform driver
        leds: max77693: Fix module autoload for OF platform driver
        leds: ktd2692: Fix module autoload for OF platform driver
        leds: bcm6358: Fix module autoload for OF platform driver
        leds: bcm6328: Fix module autoload for OF platform driver
        leds: aat1290: Fix module autoload for OF platform driver
      e6827baf
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · dc847d5b
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "The new hfi1 driver in staging/rdma has had a number of fixup patches
        since being added to the tree.  This is the first batch of those fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/hfi: Properly set permissions for user device files
        IB/hfi1: mask vs shift confusion
        IB/hfi1: clean up some defines
        IB/hfi1: info leak in get_ctxt_info()
        IB/hfi1: fix a locking bug
        IB/hfi1: checking for NULL instead of IS_ERR
        IB/hfi1: fix sdma_descq_cnt parameter parsing
        IB/hfi1: fix copy_to/from_user() error handling
        IB/hfi1: fix pstateinfo from returning improperly byteswapped value
      dc847d5b
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 2673ee56
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
      
       - a boot regression (since v4.2) fix for some ARM configurations from
         Tyler
      
       - regression (since v4.1) fixes for mkfs.xfs on a DAX enabled device
         from Jeff.  These are tagged for -stable.
      
       - a pair of locking fixes from Axel that are hidden from lockdep since
         they involve device_lock().  The "btt" one is tagged for -stable, the
         other only applies to the new "pfn" mechanism in v4.3.
      
       - a fix for the pmem ->rw_page() path to use wmb_pmem() from Ross.
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        mm: fix type cast in __pfn_to_phys()
        pmem: add proper fencing to pmem_rw_page()
        libnvdimm: pfn_devs: Fix locking in namespace_store
        libnvdimm: btt_devs: Fix locking in namespace_store
        blockdev: don't set S_DAX for misaligned partitions
        dax: fix O_DIRECT I/O to the last block of a blockdev
      2673ee56
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 133bb595
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
       "This is a bit bigger than it should be, but I could (did) not want to
        send it off last week due to both wanting extra testing, and expecting
        a fix for the bounce regression as well.  In any case, this contains:
      
         - Fix for the blk-merge.c compilation warning on gcc 5.x from me.
      
         - A set of back/front SG gap merge fixes, from me and from Sagi.
           This ensures that we honor SG gapping for integrity payloads as
           well.
      
         - Two small fixes for null_blk from Matias, fixing a leak and a
           capacity propagation issue.
      
         - A blkcg fix from Tejun, fixing a NULL dereference.
      
         - A fast clone optimization from Ming, fixing a performance
           regression since the arbitrarily sized bio's were introduced.
      
         - Also from Ming, a regression fix for bouncing IOs"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: fix bounce_end_io
        block: blk-merge: fast-clone bio when splitting rw bios
        block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg
        block: Copy a user iovec if it includes gaps
        block: Refuse adding appending a gapped integrity page to a bio
        block: Refuse request/bio merges with gaps in the integrity payload
        block: Check for gaps on front and back merges
        null_blk: fix wrong capacity when bs is not 512 bytes
        null_blk: fix memory leak on cleanup
        block: fix bogus compiler warnings in blk-merge.c
      133bb595
    • Chris Mason's avatar
      fs-writeback: unplug before cond_resched in writeback_sb_inodes · 590dca3a
      Chris Mason authored
      Commit 505a666e ("writeback: plug writeback in wb_writeback() and
      writeback_inodes_wb()") has us holding a plug during writeback_sb_inodes,
      which increases the merge rate when relatively contiguous small files
      are written by the filesystem.  It helps both on flash and spindles.
      
      For an fs_mark workload creating 4K files in parallel across 8 drives,
      this commit improves performance ~9% more by unplugging before calling
      cond_resched().  cond_resched() doesn't trigger an implicit unplug, so
      explicitly getting the IO down to the device before scheduling reduces
      latencies for anyone waiting on clean pages.
      
      It also cuts down on how often we use kblockd to unplug, which means
      less work bouncing from one workqueue to another.
      
      Many more details about how we got here:
      
        https://lkml.org/lkml/2015/9/11/570Signed-off-by: default avatarChris Mason <clm@fb.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      590dca3a
  6. 19 Sep, 2015 1 commit
  7. 18 Sep, 2015 16 commits