1. 02 7月, 2014 2 次提交
    • T
      block, blk-mq: draining can't be skipped even if bypass_depth was non-zero · 776687bc
      Tejun Heo 提交于
      Currently, both blk_queue_bypass_start() and blk_mq_freeze_queue()
      skip queue draining if bypass_depth was already above zero.  The
      assumption is that the one which bumped the bypass_depth should have
      performed draining already; however, there's nothing which prevents a
      new instance of bypassing/freezing from starting before the previous
      one finishes draining.  The current code may allow the later
      bypassing/freezing instances to complete while there still are
      in-flight requests which haven't finished draining.
      
      Fix it by draining regardless of bypass_depth.  We still skip draining
      from blk_queue_bypass_start() while the queue is initializing to avoid
      introducing excessive delays during boot.  INIT_DONE setting is moved
      above the initial blk_queue_bypass_end() so that bypassing attempts
      can't slip inbetween.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Nicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      776687bc
    • T
      blk-mq: fix a memory ordering bug in blk_mq_queue_enter() · 531ed626
      Tejun Heo 提交于
      blk-mq uses a percpu_counter to keep track of how many usages are in
      flight.  The percpu_counter is drained while freezing to ensure that
      no usage is left in-flight after freezing is complete.
      
      blk_mq_queue_enter/exit() and blk_mq_[un]freeze_queue() implement this
      per-cpu gating mechanism; unfortunately, it contains a subtle bug -
      smp_wmb() in blk_mq_queue_enter() doesn't prevent prevent the cpu from
      fetching @q->bypass_depth before incrementing @q->mq_usage_counter and
      if freezing happens inbetween the caller can slip through and freezing
      can be complete while there are active users.
      
      Use smp_mb() instead so that bypass_depth and mq_usage_counter
      modifications and tests are properly interlocked.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Nicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      531ed626
  2. 25 6月, 2014 1 次提交
  3. 14 6月, 2014 2 次提交
  4. 10 6月, 2014 1 次提交
  5. 09 6月, 2014 1 次提交
  6. 07 6月, 2014 2 次提交
  7. 06 6月, 2014 1 次提交
    • J
      blk-mq: bump max tag depth to 10K tags · a4391c64
      Jens Axboe 提交于
      For some scsi-mq cases, the tag map can be huge. So increase the
      max number of tags we support.
      
      Additionally, don't fail with EINVAL if a user requests too many
      tags. Warn that the tag depth has been adjusted down, and store
      the new value inside the tag_set passed in.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a4391c64
  8. 05 6月, 2014 1 次提交
  9. 04 6月, 2014 5 次提交
  10. 31 5月, 2014 2 次提交
  11. 30 5月, 2014 3 次提交
  12. 29 5月, 2014 3 次提交
  13. 28 5月, 2014 8 次提交
  14. 27 5月, 2014 4 次提交
  15. 24 5月, 2014 1 次提交
  16. 23 5月, 2014 1 次提交
    • J
      blk-mq: split make request handler for multi and single queue · 07068d5b
      Jens Axboe 提交于
      We want slightly different behavior from them:
      
      - On single queue devices, we currently use the per-process plug
        for deferred IO and for merging.
      
      - On multi queue devices, we don't use the per-process plug, but
        we want to go straight to hardware for SYNC IO.
      
      Split blk_mq_make_request() into a blk_sq_make_request() for single
      queue devices, and retain blk_mq_make_request() for multi queue
      devices. Then we don't need multiple checks for q->nr_hw_queues
      in the request mapping.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      07068d5b
  17. 22 5月, 2014 2 次提交