null_blk.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Null block device driver
  2. ================================================================================
  3. I. Overview
  4. The null block device (/dev/nullb*) is used for benchmarking the various
  5. block-layer implementations. It emulates a block device of X gigabytes in size.
  6. The following instances are possible:
  7. Single-queue block-layer
  8. - Request-based.
  9. - Single submission queue per device.
  10. - Implements IO scheduling algorithms (CFQ, Deadline, noop).
  11. Multi-queue block-layer
  12. - Request-based.
  13. - Configurable submission queues per device.
  14. No block-layer (Known as bio-based)
  15. - Bio-based. IO requests are submitted directly to the device driver.
  16. - Directly accepts bio data structure and returns them.
  17. All of them have a completion queue for each core in the system.
  18. II. Module parameters applicable for all instances:
  19. queue_mode=[0-2]: Default: 2-Multi-queue
  20. Selects which block-layer the module should instantiate with.
  21. 0: Bio-based.
  22. 1: Single-queue.
  23. 2: Multi-queue.
  24. home_node=[0--nr_nodes]: Default: NUMA_NO_NODE
  25. Selects what CPU node the data structures are allocated from.
  26. gb=[Size in GB]: Default: 250GB
  27. The size of the device reported to the system.
  28. bs=[Block size (in bytes)]: Default: 512 bytes
  29. The block size reported to the system.
  30. nr_devices=[Number of devices]: Default: 2
  31. Number of block devices instantiated. They are instantiated as /dev/nullb0,
  32. etc.
  33. irqmode=[0-2]: Default: 1-Soft-irq
  34. The completion mode used for completing IOs to the block-layer.
  35. 0: None.
  36. 1: Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead
  37. when IOs are issued from another CPU node than the home the device is
  38. connected to.
  39. 2: Timer: Waits a specific period (completion_nsec) for each IO before
  40. completion.
  41. completion_nsec=[ns]: Default: 10.000ns
  42. Combined with irqmode=2 (timer). The time each completion event must wait.
  43. submit_queues=[0..nr_cpus]:
  44. The number of submission queues attached to the device driver. If unset, it
  45. defaults to 1 on single-queue and bio-based instances. For multi-queue,
  46. it is ignored when use_per_node_hctx module parameter is 1.
  47. hw_queue_depth=[0..qdepth]: Default: 64
  48. The hardware queue depth of the device.
  49. III: Multi-queue specific parameters
  50. use_per_node_hctx=[0/1]: Default: 0
  51. 0: The number of submit queues are set to the value of the submit_queues
  52. parameter.
  53. 1: The multi-queue block layer is instantiated with a hardware dispatch
  54. queue for each CPU node in the system.
  55. use_lightnvm=[0/1]: Default: 0
  56. Register device with LightNVM. Requires blk-mq to be used.