1. 02 6月, 2015 2 次提交
    • A
      null_blk: restart request processing on completion handler · 8b70f45e
      Akinobu Mita 提交于
      When irqmode=2 (IRQ completion handler is timer) and queue_mode=1
      (Block interface to use is rq), the completion handler should restart
      request handling for any pending requests on a queue because request
      processing stops when the number of commands are queued more than
      hw_queue_depth (null_rq_prep_fn returns BLKPREP_DEFER).
      
      Without this change, the following command cannot finish.
      
      	# modprobe null_blk irqmode=2 queue_mode=1 hw_queue_depth=1
      	# fio --name=t --rw=read --size=1g --direct=1 \
      	  --ioengine=libaio --iodepth=64 --filename=/dev/nullb0
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Jens Axboe <axboe@fb.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      8b70f45e
    • A
      null_blk: prevent timer handler running on a different CPU where started · 419c21a3
      Akinobu Mita 提交于
      When irqmode=2 (IRQ completion handler is timer), timer handler should
      be called on the same CPU where the timer has been started.
      
      Since completion_queues are per-cpu and the completion handler only
      touches completion_queue for local CPU, we need to prevent the handler
      from running on a different CPU where the timer has been started.
      Otherwise, the IO cannot be completed until another completion handler
      is executed on that CPU.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Jens Axboe <axboe@fb.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      419c21a3
  2. 28 5月, 2015 1 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  3. 17 1月, 2015 1 次提交
    • J
      null_blk: suppress invalid partition info · 227290b4
      Jens Axboe 提交于
      null_blk is partitionable, but it doesn't store any of the info. When
      it is loaded, you would normally see:
      
      [1226739.343608]  nullb0: unknown partition table
      [1226739.343746]  nullb1: unknown partition table
      
      which can confuse some people. Add the appropriate gendisk flag
      to suppress this info.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      227290b4
  4. 03 1月, 2015 1 次提交
  5. 27 11月, 2014 1 次提交
  6. 30 10月, 2014 1 次提交
    • J
      blk-mq: add a 'list' parameter to ->queue_rq() · 74c45052
      Jens Axboe 提交于
      Since we have the notion of a 'last' request in a chain, we can use
      this to have the hardware optimize the issuing of requests. Add
      a list_head parameter to queue_rq that the driver can use to
      temporarily store hw commands for issue when 'last' is true. If we
      are doing a chain of requests, pass in a NULL list for the first
      request to force issue of that immediately, then batch the remainder
      for deferred issue until the last request has been sent.
      
      Instead of adding yet another argument to the hot ->queue_rq path,
      encapsulate the passed arguments in a blk_mq_queue_data structure.
      This is passed as a constant, and has been tested as faster than
      passing 4 (or even 3) args through ->queue_rq. Update drivers for
      the new ->queue_rq() prototype. There are no functional changes
      in this patch for drivers - if they don't use the passed in list,
      then they will just queue requests individually like before.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      74c45052
  7. 22 10月, 2014 1 次提交
  8. 05 10月, 2014 1 次提交
    • M
      block: disable entropy contributions for nonrot devices · b277da0a
      Mike Snitzer 提交于
      Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
      QUEUE_FLAG_NONROT.
      
      Historically, all block devices have automatically made entropy
      contributions.  But as previously stated in commit e2e1a148 ("block: add
      sysfs knob for turning off disk entropy contributions"):
          - On SSD disks, the completion times aren't as random as they
            are for rotational drives. So it's questionable whether they
            should contribute to the random pool in the first place.
          - Calling add_disk_randomness() has a lot of overhead.
      
      There are more reliable sources for randomness than non-rotational block
      devices.  From a security perspective it is better to err on the side of
      caution than to allow entropy contributions from unreliable "random"
      sources.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b277da0a
  9. 23 9月, 2014 3 次提交
  10. 03 9月, 2014 1 次提交
    • R
      blk-mq: pass along blk_mq_alloc_tag_set return values · dc501dc0
      Robert Elliott 提交于
      Two of the blk-mq based drivers do not pass back the return value
      from blk_mq_alloc_tag_set, instead just returning -ENOMEM.
      
      blk_mq_alloc_tag_set returns -EINVAL if the number of queues or
      queue depth is bad.  -ENOMEM implies that retrying after freeing some
      memory might be more successful, but that won't ever change
      in the -EINVAL cases.
      
      Change the null_blk and mtip32xx drivers to pass along
      the return value.
      Signed-off-by: NRobert Elliott <elliott@hp.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      dc501dc0
  11. 17 6月, 2014 1 次提交
  12. 12 6月, 2014 1 次提交
  13. 29 5月, 2014 1 次提交
  14. 28 5月, 2014 1 次提交
  15. 01 5月, 2014 1 次提交
  16. 16 4月, 2014 2 次提交
  17. 11 2月, 2014 1 次提交
  18. 08 2月, 2014 1 次提交
    • S
      block/null_blk: Fix completion processing from LIFO to FIFO · d7790b92
      Shlomo Pongratz 提交于
      The completion queue is implemented using lockless list.
      
      The llist_add is adds the events to the list head which is a push operation.
      The processing of the completion elements is done by disconnecting all the
      pushed elements and iterating over the disconnected list. The problem is
      that the processing is done in reverse order w.r.t order of the insertion
      i.e. LIFO processing. By reversing the disconnected list which is done in
      linear time the desired FIFO processing is achieved.
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      d7790b92
  19. 22 1月, 2014 1 次提交
  20. 12 1月, 2014 1 次提交
  21. 22 12月, 2013 2 次提交
  22. 19 12月, 2013 3 次提交
  23. 16 12月, 2013 1 次提交
  24. 22 11月, 2013 1 次提交
  25. 25 10月, 2013 1 次提交