1. 30 1月, 2015 1 次提交
    • J
      NVMe: avoid kmalloc/kfree for smaller IO · ac3dd5bd
      Jens Axboe 提交于
      Currently we allocate an nvme_iod for each IO, which holds the
      sg list, prps, and other IO related info. Set a threshold of
      2 pages and/or 8KB of data, below which we can just embed this
      in the per-command pdu in blk-mq. For any IO at or below
      NVME_INT_PAGES and NVME_INT_BYTES, we save a kmalloc and kfree.
      
      For higher IOPS, this saves up to 1% of CPU time.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      ac3dd5bd
  2. 22 1月, 2015 1 次提交
  3. 03 1月, 2015 1 次提交
  4. 23 12月, 2014 1 次提交
  5. 12 12月, 2014 2 次提交
    • J
      NVMe: fix race condition in nvme_submit_sync_cmd() · 849c6e77
      Jens Axboe 提交于
      If we have a race between the schedule timing out and the command
      completing, we could have the task issuing the command exit
      nvme_submit_sync_cmd() while the irq is running sync_completion().
      If that happens, we could be corrupting memory, since the stack
      that held 'cmdinfo' is no longer valid.
      
      Fix this by always calling nvme_abort_cmd_info(). Once that call
      completes, we know that we have either run sync_completion() if
      the completion came in, or that we will never run it since we now
      have special_completion() as the command callback handler.
      Acked-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      849c6e77
    • J
      NVMe: fix retry/error logic in nvme_queue_rq() · fe54303e
      Jens Axboe 提交于
      The logic around retrying and erroring IO in nvme_queue_rq() is broken
      in a few ways:
      
      - If we fail allocating dma memory for a discard, we return retry. We
        have the 'iod' stored in ->special, but we free the 'iod'.
      
      - For a normal request, if we fail dma mapping of setting up prps, we
        have the same iod situation. Additionally, we haven't set the callback
        for the request yet, so we also potentially leak IOMMU resources.
      
      Get rid of the ->special 'iod' store. The retry is uncommon enough that
      it's not worth optimizing for or holding on to resources to attempt to
      speed it up. Additionally, it's usually best practice to free any
      request related resources when doing retries.
      Acked-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      fe54303e
  6. 11 12月, 2014 3 次提交
  7. 04 12月, 2014 1 次提交
  8. 22 11月, 2014 1 次提交
  9. 21 11月, 2014 2 次提交
  10. 20 11月, 2014 1 次提交
  11. 18 11月, 2014 3 次提交
  12. 11 11月, 2014 1 次提交
  13. 06 11月, 2014 1 次提交
  14. 05 11月, 2014 21 次提交