1. 02 3月, 2017 3 次提交
  2. 28 2月, 2017 2 次提交
  3. 24 2月, 2017 4 次提交
    • O
      blk-mq-sched: separate mark hctx and queue restart operations · d38d3515
      Omar Sandoval 提交于
      In blk_mq_sched_dispatch_requests(), we call blk_mq_sched_mark_restart()
      after we dispatch requests left over on our hardware queue dispatch
      list. This is so we'll go back and dispatch requests from the scheduler.
      In this case, it's only necessary to restart the hardware queue that we
      are running; there's no reason to run other hardware queues just because
      we are using shared tags.
      
      So, split out blk_mq_sched_mark_restart() into two operations, one for
      just the hardware queue and one for the whole request queue. The core
      code only needs the hctx variant, but I/O schedulers will want to use
      both.
      
      This also requires adjusting blk_mq_sched_restart_queues() to always
      check the queue restart flag, not just when using shared tags.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      d38d3515
    • O
      blk-mq: use sbq wait queues instead of restart for driver tags · da55f2cc
      Omar Sandoval 提交于
      Commit 50e1dab8 ("blk-mq-sched: fix starvation for multiple hardware
      queues and shared tags") fixed one starvation issue for shared tags.
      However, we can still get into a situation where we fail to allocate a
      tag because all tags are allocated but we don't have any pending
      requests on any hardware queue.
      
      One solution for this would be to restart all queues that share a tag
      map, but that really sucks. Ideally, we could just block and wait for a
      tag, but that isn't always possible from blk_mq_dispatch_rq_list().
      
      However, we can still use the struct sbitmap_queue wait queues with a
      custom callback instead of blocking. This has a few benefits:
      
      1. It avoids iterating over all hardware queues when completing an I/O,
         which the current restart code has to do.
      2. It benefits from the existing rolling wakeup code.
      3. It avoids punting to another thread just to have it block.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      da55f2cc
    • S
      block/sed-opal: Propagate original error message to userland. · 2d19020b
      Scott Bauer 提交于
      During an error on a comannd, ex: user provides wrong pw to unlock
      range, we will gracefully terminate the opal session. We want to
      propagate the original error to userland instead of the result of
      the session termination, which is almost always a success.
      Signed-off-by: NScott Bauer <scott.bauer@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      2d19020b
    • S
      block/sed-opal: Introduce free_opal_dev to free the structure and clean up state · 7d6d1578
      Scott Bauer 提交于
      Before we free the opal structure we need to clean up any saved
      locking ranges that the user had told us to unlock from a suspend.
      Signed-off-by: NScott Bauer <scott.bauer@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      7d6d1578
  4. 23 2月, 2017 6 次提交
  5. 22 2月, 2017 2 次提交
  6. 18 2月, 2017 7 次提交
  7. 16 2月, 2017 2 次提交
  8. 15 2月, 2017 2 次提交
  9. 14 2月, 2017 1 次提交
  10. 11 2月, 2017 3 次提交
  11. 09 2月, 2017 3 次提交
  12. 07 2月, 2017 3 次提交
  13. 04 2月, 2017 2 次提交
    • J
      block: free merged request in the caller · e4d750c9
      Jens Axboe 提交于
      If we end up doing a request-to-request merge when we have completed
      a bio-to-request merge, we free the request from deep down in that
      path. For blk-mq-sched, the merge path has to hold the appropriate
      lock, but we don't need it for freeing the request. And in fact
      holding the lock is problematic, since we are now calling the
      mq sched put_rq_private() hook with the lock held. Other call paths
      do not hold this lock.
      
      Fix this inconsistency by ensuring that the caller frees a merged
      request. Then we can do it outside of the lock, making it both more
      efficient and fixing the blk-mq-sched problem of invoking parts of
      the scheduler with an unknown lock state.
      Reported-by: NPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      Reviewed-by: NOmar Sandoval <osandov@fb.com>
      e4d750c9
    • J
      blk-merge: return the merged request · b973cb7e
      Jens Axboe 提交于
      When we attempt to merge request-to-request, we return a 0/1 if we
      ended up merging or not. Change that to return the pointer to the
      request that we freed. We will use this to move the freeing of
      that request out of the merge logic, so that callers can drop
      locks before freeing the request.
      
      There should be no functional changes in this patch.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      Reviewed-by: NOmar Sandoval <osandov@fb.com>
      b973cb7e