blob: 733927a7b501a5f93b518db8417db181b0e8bbb7 [file] [log] [blame]
Matias Bjorling12f8f4f2013-12-18 13:41:42 +01001Null block device driver
2================================================================================
3
4I. Overview
5
6The null block device (/dev/nullb*) is used for benchmarking the various
7block-layer implementations. It emulates a block device of X gigabytes in size.
8The following instances are possible:
9
10 Single-queue block-layer
11 - Request-based.
12 - Single submission queue per device.
13 - Implements IO scheduling algorithms (CFQ, Deadline, noop).
14 Multi-queue block-layer
15 - Request-based.
16 - Configurable submission queues per device.
17 No block-layer (Known as bio-based)
18 - Bio-based. IO requests are submitted directly to the device driver.
19 - Directly accepts bio data structure and returns them.
20
Matias Bjørling89ed05e2013-12-21 00:10:59 +010021All of them have a completion queue for each core in the system.
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010022
23II. Module parameters applicable for all instances:
24
25queue_mode=[0-2]: Default: 2-Multi-queue
26 Selects which block-layer the module should instantiate with.
27
28 0: Bio-based.
29 1: Single-queue.
30 2: Multi-queue.
31
32home_node=[0--nr_nodes]: Default: NUMA_NO_NODE
Matias Bjørling89ed05e2013-12-21 00:10:59 +010033 Selects what CPU node the data structures are allocated from.
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010034
35gb=[Size in GB]: Default: 250GB
36 The size of the device reported to the system.
37
38bs=[Block size (in bytes)]: Default: 512 bytes
39 The block size reported to the system.
40
Minwoo Ime8815242017-11-07 22:23:01 +090041nr_devices=[Number of devices]: Default: 1
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010042 Number of block devices instantiated. They are instantiated as /dev/nullb0,
43 etc.
44
Fam Zhenga2787312014-08-14 13:26:22 +080045irqmode=[0-2]: Default: 1-Soft-irq
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010046 The completion mode used for completing IOs to the block-layer.
47
48 0: None.
Matias Bjørling89ed05e2013-12-21 00:10:59 +010049 1: Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead
50 when IOs are issued from another CPU node than the home the device is
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010051 connected to.
52 2: Timer: Waits a specific period (completion_nsec) for each IO before
53 completion.
54
Minwoo Ime8815242017-11-07 22:23:01 +090055completion_nsec=[ns]: Default: 10,000ns
Fam Zhenga2787312014-08-14 13:26:22 +080056 Combined with irqmode=2 (timer). The time each completion event must wait.
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010057
weiping zhang23c44902017-10-14 00:26:28 +080058submit_queues=[1..nr_cpus]:
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010059 The number of submission queues attached to the device driver. If unset, it
weiping zhang23c44902017-10-14 00:26:28 +080060 defaults to 1. For multi-queue, it is ignored when use_per_node_hctx module
61 parameter is 1.
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010062
Matias Bjørling89ed05e2013-12-21 00:10:59 +010063hw_queue_depth=[0..qdepth]: Default: 64
Matias Bjorling12f8f4f2013-12-18 13:41:42 +010064 The hardware queue depth of the device.
65
66III: Multi-queue specific parameters
67
Matias Bjørling20005242013-12-21 00:11:00 +010068use_per_node_hctx=[0/1]: Default: 0
69 0: The number of submit queues are set to the value of the submit_queues
70 parameter.
71 1: The multi-queue block layer is instantiated with a hardware dispatch
72 queue for each CPU node in the system.
Matias Bjørlingb2b7e002015-11-12 20:25:10 +010073
74use_lightnvm=[0/1]: Default: 0
Yasuaki Ishimatsu92153d32016-11-16 08:26:11 -070075 Register device with LightNVM. Requires blk-mq and CONFIG_NVM to be enabled.
weiping zhangfc186312017-10-14 00:26:54 +080076
77no_sched=[0/1]: Default: 0
78 0: nullb* use default blk-mq io scheduler.
79 1: nullb* doesn't use io scheduler.
Minwoo Imbf9fc982017-11-07 09:25:37 -070080
81shared_tags=[0/1]: Default: 0
82 0: Tag set is not shared.
83 1: Tag set shared between devices for blk-mq. Only makes sense with
84 nr_devices > 1, otherwise there's no tag set to share.