2013-12-18 20:41:42 +08:00
|
|
|
Null block device driver
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
I. Overview
|
|
|
|
|
|
|
|
The null block device (/dev/nullb*) is used for benchmarking the various
|
|
|
|
block-layer implementations. It emulates a block device of X gigabytes in size.
|
|
|
|
The following instances are possible:
|
|
|
|
|
|
|
|
Single-queue block-layer
|
|
|
|
- Request-based.
|
|
|
|
- Single submission queue per device.
|
|
|
|
- Implements IO scheduling algorithms (CFQ, Deadline, noop).
|
|
|
|
Multi-queue block-layer
|
|
|
|
- Request-based.
|
|
|
|
- Configurable submission queues per device.
|
|
|
|
No block-layer (Known as bio-based)
|
|
|
|
- Bio-based. IO requests are submitted directly to the device driver.
|
|
|
|
- Directly accepts bio data structure and returns them.
|
|
|
|
|
2013-12-21 07:10:59 +08:00
|
|
|
All of them have a completion queue for each core in the system.
|
2013-12-18 20:41:42 +08:00
|
|
|
|
|
|
|
II. Module parameters applicable for all instances:
|
|
|
|
|
|
|
|
queue_mode=[0-2]: Default: 2-Multi-queue
|
|
|
|
Selects which block-layer the module should instantiate with.
|
|
|
|
|
|
|
|
0: Bio-based.
|
|
|
|
1: Single-queue.
|
|
|
|
2: Multi-queue.
|
|
|
|
|
|
|
|
home_node=[0--nr_nodes]: Default: NUMA_NO_NODE
|
2013-12-21 07:10:59 +08:00
|
|
|
Selects what CPU node the data structures are allocated from.
|
2013-12-18 20:41:42 +08:00
|
|
|
|
|
|
|
gb=[Size in GB]: Default: 250GB
|
|
|
|
The size of the device reported to the system.
|
|
|
|
|
|
|
|
bs=[Block size (in bytes)]: Default: 512 bytes
|
|
|
|
The block size reported to the system.
|
|
|
|
|
2013-12-21 07:10:59 +08:00
|
|
|
nr_devices=[Number of devices]: Default: 2
|
2013-12-18 20:41:42 +08:00
|
|
|
Number of block devices instantiated. They are instantiated as /dev/nullb0,
|
|
|
|
etc.
|
|
|
|
|
2014-08-14 13:26:22 +08:00
|
|
|
irqmode=[0-2]: Default: 1-Soft-irq
|
2013-12-18 20:41:42 +08:00
|
|
|
The completion mode used for completing IOs to the block-layer.
|
|
|
|
|
|
|
|
0: None.
|
2013-12-21 07:10:59 +08:00
|
|
|
1: Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead
|
|
|
|
when IOs are issued from another CPU node than the home the device is
|
2013-12-18 20:41:42 +08:00
|
|
|
connected to.
|
|
|
|
2: Timer: Waits a specific period (completion_nsec) for each IO before
|
|
|
|
completion.
|
|
|
|
|
2013-12-21 07:10:59 +08:00
|
|
|
completion_nsec=[ns]: Default: 10.000ns
|
2014-08-14 13:26:22 +08:00
|
|
|
Combined with irqmode=2 (timer). The time each completion event must wait.
|
2013-12-18 20:41:42 +08:00
|
|
|
|
2017-10-14 00:26:28 +08:00
|
|
|
submit_queues=[1..nr_cpus]:
|
2013-12-18 20:41:42 +08:00
|
|
|
The number of submission queues attached to the device driver. If unset, it
|
2017-10-14 00:26:28 +08:00
|
|
|
defaults to 1. For multi-queue, it is ignored when use_per_node_hctx module
|
|
|
|
parameter is 1.
|
2013-12-18 20:41:42 +08:00
|
|
|
|
2013-12-21 07:10:59 +08:00
|
|
|
hw_queue_depth=[0..qdepth]: Default: 64
|
2013-12-18 20:41:42 +08:00
|
|
|
The hardware queue depth of the device.
|
|
|
|
|
|
|
|
III: Multi-queue specific parameters
|
|
|
|
|
2013-12-21 07:11:00 +08:00
|
|
|
use_per_node_hctx=[0/1]: Default: 0
|
|
|
|
0: The number of submit queues are set to the value of the submit_queues
|
|
|
|
parameter.
|
|
|
|
1: The multi-queue block layer is instantiated with a hardware dispatch
|
|
|
|
queue for each CPU node in the system.
|
2015-11-13 03:25:10 +08:00
|
|
|
|
|
|
|
use_lightnvm=[0/1]: Default: 0
|
2016-11-16 23:26:11 +08:00
|
|
|
Register device with LightNVM. Requires blk-mq and CONFIG_NVM to be enabled.
|