diff options
| -rw-r--r-- | Documentation/block/null_blk.txt | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.txt new file mode 100644 index 000000000000..9e1b047fd13d --- /dev/null +++ b/Documentation/block/null_blk.txt | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | Null block device driver | ||
| 2 | ================================================================================ | ||
| 3 | |||
| 4 | I. Overview | ||
| 5 | |||
| 6 | The null block device (/dev/nullb*) is used for benchmarking the various | ||
| 7 | block-layer implementations. It emulates a block device of X gigabytes in size. | ||
| 8 | The 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 | |||
| 21 | All of them has a completion queue for each core in the system. | ||
| 22 | |||
| 23 | II. Module parameters applicable for all instances: | ||
| 24 | |||
| 25 | queue_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 | |||
| 32 | home_node=[0--nr_nodes]: Default: NUMA_NO_NODE | ||
| 33 | Selects what socket the data structures is allocated from. | ||
| 34 | |||
| 35 | gb=[Size in GB]: Default: 250GB | ||
| 36 | The size of the device reported to the system. | ||
| 37 | |||
| 38 | bs=[Block size (in bytes)]: Default: 512 bytes | ||
| 39 | The block size reported to the system. | ||
| 40 | |||
| 41 | nr_devices=[Num. devices]: Default: 2 | ||
| 42 | Number of block devices instantiated. They are instantiated as /dev/nullb0, | ||
| 43 | etc. | ||
| 44 | |||
| 45 | irq_mode=[0-2]: Default: Soft-irq | ||
| 46 | The completion mode used for completing IOs to the block-layer. | ||
| 47 | |||
| 48 | 0: None. | ||
| 49 | 1: Soft-irq. Uses ipi to complete IOs across sockets. Simulates the overhead | ||
| 50 | when IOs are issued from another socket than the home the device is | ||
| 51 | connected to. | ||
| 52 | 2: Timer: Waits a specific period (completion_nsec) for each IO before | ||
| 53 | completion. | ||
| 54 | |||
| 55 | completion_nsec=[Num. ns]: Default: 10.000ns | ||
| 56 | Combined with irq_mode=2 (timer). The time each completion event must wait. | ||
| 57 | |||
| 58 | submit_queues=[0..nr_cpus]: | ||
| 59 | The number of submission queues attached to the device driver. If unset, it | ||
| 60 | defaults to 1 on single-queue and bio-based instances. For multi-queue, | ||
| 61 | its ignored when use_per_node_hctx module parameter is 1. | ||
| 62 | |||
| 63 | hw_queue_depth=[0..qdepth]: Defaults: 64 | ||
| 64 | The hardware queue depth of the device. | ||
| 65 | |||
| 66 | III: Multi-queue specific parameters | ||
| 67 | |||
| 68 | use_per_node_hctx=[0/1]: Defaults: 1 | ||
| 69 | If 1, the multi-queue block layer is instantiated with a hardware dispatch | ||
| 70 | queue for each CPU node in the system. If 0, it is instantiated with the | ||
| 71 | number of queues defined in the submit_queues parameter. | ||
