diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-25 14:36:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-25 14:36:43 -0400 |
commit | a7e546f175f07630453c44b5afe14dd667dcfec9 (patch) | |
tree | 352c2577161f0cbe8c3b49bb6f053cfd49ed32b4 /Documentation | |
parent | da31ce727e8cc6920de5840e35b4e770c08e86e3 (diff) | |
parent | 676ce6d5ca3098339c028d44fe0427d1566a4d2d (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block-related fixes from Jens Axboe:
- Improvements to the buffered and direct write IO plugging from
Fengguang.
- Abstract out the mapping of a bio in a request, and use that to
provide a blk_bio_map_sg() helper. Useful for mapping just a bio
instead of a full request.
- Regression fix from Hugh, fixing up a patch that went into the
previous release cycle (and marked stable, too) attempting to prevent
a loop in __getblk_slow().
- Updates to discard requests, fixing up the sizing and how we align
them. Also a change to disallow merging of discard requests, since
that doesn't really work properly yet.
- A few drbd fixes.
- Documentation updates.
* 'for-linus' of git://git.kernel.dk/linux-block:
block: replace __getblk_slow misfix by grow_dev_page fix
drbd: Write all pages of the bitmap after an online resize
drbd: Finish requests that completed while IO was frozen
drbd: fix drbd wire compatibility for empty flushes
Documentation: update tunable options in block/cfq-iosched.txt
Documentation: update tunable options in block/cfq-iosched.txt
Documentation: update missing index files in block/00-INDEX
block: move down direct IO plugging
block: remove plugging at buffered write time
block: disable discard request merge temporarily
bio: Fix potential memory leak in bio_find_or_create_slab()
block: Don't use static to define "void *p" in show_partition_start()
block: Add blk_bio_map_sg() helper
block: Introduce __blk_segment_map_sg() helper
fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices
block: split discard into aligned requests
block: reorganize rounding of max_discard_sectors
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/block/00-INDEX | 10 | ||||
-rw-r--r-- | Documentation/block/cfq-iosched.txt | 77 | ||||
-rw-r--r-- | Documentation/block/queue-sysfs.txt | 64 |
3 files changed, 149 insertions, 2 deletions
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX index d111e3b23db0..d18ecd827c40 100644 --- a/Documentation/block/00-INDEX +++ b/Documentation/block/00-INDEX | |||
@@ -3,15 +3,21 @@ | |||
3 | biodoc.txt | 3 | biodoc.txt |
4 | - Notes on the Generic Block Layer Rewrite in Linux 2.5 | 4 | - Notes on the Generic Block Layer Rewrite in Linux 2.5 |
5 | capability.txt | 5 | capability.txt |
6 | - Generic Block Device Capability (/sys/block/<disk>/capability) | 6 | - Generic Block Device Capability (/sys/block/<device>/capability) |
7 | cfq-iosched.txt | ||
8 | - CFQ IO scheduler tunables | ||
9 | data-integrity.txt | ||
10 | - Block data integrity | ||
7 | deadline-iosched.txt | 11 | deadline-iosched.txt |
8 | - Deadline IO scheduler tunables | 12 | - Deadline IO scheduler tunables |
9 | ioprio.txt | 13 | ioprio.txt |
10 | - Block io priorities (in CFQ scheduler) | 14 | - Block io priorities (in CFQ scheduler) |
15 | queue-sysfs.txt | ||
16 | - Queue's sysfs entries | ||
11 | request.txt | 17 | request.txt |
12 | - The members of struct request (in include/linux/blkdev.h) | 18 | - The members of struct request (in include/linux/blkdev.h) |
13 | stat.txt | 19 | stat.txt |
14 | - Block layer statistics in /sys/block/<dev>/stat | 20 | - Block layer statistics in /sys/block/<device>/stat |
15 | switching-sched.txt | 21 | switching-sched.txt |
16 | - Switching I/O schedulers at runtime | 22 | - Switching I/O schedulers at runtime |
17 | writeback_cache_control.txt | 23 | writeback_cache_control.txt |
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt index 6d670f570451..d89b4fe724d7 100644 --- a/Documentation/block/cfq-iosched.txt +++ b/Documentation/block/cfq-iosched.txt | |||
@@ -1,3 +1,14 @@ | |||
1 | CFQ (Complete Fairness Queueing) | ||
2 | =============================== | ||
3 | |||
4 | The main aim of CFQ scheduler is to provide a fair allocation of the disk | ||
5 | I/O bandwidth for all the processes which requests an I/O operation. | ||
6 | |||
7 | CFQ maintains the per process queue for the processes which request I/O | ||
8 | operation(syncronous requests). In case of asynchronous requests, all the | ||
9 | requests from all the processes are batched together according to their | ||
10 | process's I/O priority. | ||
11 | |||
1 | CFQ ioscheduler tunables | 12 | CFQ ioscheduler tunables |
2 | ======================== | 13 | ======================== |
3 | 14 | ||
@@ -25,6 +36,72 @@ there are multiple spindles behind single LUN (Host based hardware RAID | |||
25 | controller or for storage arrays), setting slice_idle=0 might end up in better | 36 | controller or for storage arrays), setting slice_idle=0 might end up in better |
26 | throughput and acceptable latencies. | 37 | throughput and acceptable latencies. |
27 | 38 | ||
39 | back_seek_max | ||
40 | ------------- | ||
41 | This specifies, given in Kbytes, the maximum "distance" for backward seeking. | ||
42 | The distance is the amount of space from the current head location to the | ||
43 | sectors that are backward in terms of distance. | ||
44 | |||
45 | This parameter allows the scheduler to anticipate requests in the "backward" | ||
46 | direction and consider them as being the "next" if they are within this | ||
47 | distance from the current head location. | ||
48 | |||
49 | back_seek_penalty | ||
50 | ----------------- | ||
51 | This parameter is used to compute the cost of backward seeking. If the | ||
52 | backward distance of request is just 1/back_seek_penalty from a "front" | ||
53 | request, then the seeking cost of two requests is considered equivalent. | ||
54 | |||
55 | So scheduler will not bias toward one or the other request (otherwise scheduler | ||
56 | will bias toward front request). Default value of back_seek_penalty is 2. | ||
57 | |||
58 | fifo_expire_async | ||
59 | ----------------- | ||
60 | This parameter is used to set the timeout of asynchronous requests. Default | ||
61 | value of this is 248ms. | ||
62 | |||
63 | fifo_expire_sync | ||
64 | ---------------- | ||
65 | This parameter is used to set the timeout of synchronous requests. Default | ||
66 | value of this is 124ms. In case to favor synchronous requests over asynchronous | ||
67 | one, this value should be decreased relative to fifo_expire_async. | ||
68 | |||
69 | slice_async | ||
70 | ----------- | ||
71 | This parameter is same as of slice_sync but for asynchronous queue. The | ||
72 | default value is 40ms. | ||
73 | |||
74 | slice_async_rq | ||
75 | -------------- | ||
76 | This parameter is used to limit the dispatching of asynchronous request to | ||
77 | device request queue in queue's slice time. The maximum number of request that | ||
78 | are allowed to be dispatched also depends upon the io priority. Default value | ||
79 | for this is 2. | ||
80 | |||
81 | slice_sync | ||
82 | ---------- | ||
83 | When a queue is selected for execution, the queues IO requests are only | ||
84 | executed for a certain amount of time(time_slice) before switching to another | ||
85 | queue. This parameter is used to calculate the time slice of synchronous | ||
86 | queue. | ||
87 | |||
88 | time_slice is computed using the below equation:- | ||
89 | time_slice = slice_sync + (slice_sync/5 * (4 - prio)). To increase the | ||
90 | time_slice of synchronous queue, increase the value of slice_sync. Default | ||
91 | value is 100ms. | ||
92 | |||
93 | quantum | ||
94 | ------- | ||
95 | This specifies the number of request dispatched to the device queue. In a | ||
96 | queue's time slice, a request will not be dispatched if the number of request | ||
97 | in the device exceeds this parameter. This parameter is used for synchronous | ||
98 | request. | ||
99 | |||
100 | In case of storage with several disk, this setting can limit the parallel | ||
101 | processing of request. Therefore, increasing the value can imporve the | ||
102 | performace although this can cause the latency of some I/O to increase due | ||
103 | to more number of requests. | ||
104 | |||
28 | CFQ IOPS Mode for group scheduling | 105 | CFQ IOPS Mode for group scheduling |
29 | =================================== | 106 | =================================== |
30 | Basic CFQ design is to provide priority based time slices. Higher priority | 107 | Basic CFQ design is to provide priority based time slices. Higher priority |
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt index 6518a55273e7..e54ac1d53403 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -9,20 +9,71 @@ These files are the ones found in the /sys/block/xxx/queue/ directory. | |||
9 | Files denoted with a RO postfix are readonly and the RW postfix means | 9 | Files denoted with a RO postfix are readonly and the RW postfix means |
10 | read-write. | 10 | read-write. |
11 | 11 | ||
12 | add_random (RW) | ||
13 | ---------------- | ||
14 | This file allows to trun off the disk entropy contribution. Default | ||
15 | value of this file is '1'(on). | ||
16 | |||
17 | discard_granularity (RO) | ||
18 | ----------------------- | ||
19 | This shows the size of internal allocation of the device in bytes, if | ||
20 | reported by the device. A value of '0' means device does not support | ||
21 | the discard functionality. | ||
22 | |||
23 | discard_max_bytes (RO) | ||
24 | ---------------------- | ||
25 | Devices that support discard functionality may have internal limits on | ||
26 | the number of bytes that can be trimmed or unmapped in a single operation. | ||
27 | The discard_max_bytes parameter is set by the device driver to the maximum | ||
28 | number of bytes that can be discarded in a single operation. Discard | ||
29 | requests issued to the device must not exceed this limit. A discard_max_bytes | ||
30 | value of 0 means that the device does not support discard functionality. | ||
31 | |||
32 | discard_zeroes_data (RO) | ||
33 | ------------------------ | ||
34 | When read, this file will show if the discarded block are zeroed by the | ||
35 | device or not. If its value is '1' the blocks are zeroed otherwise not. | ||
36 | |||
12 | hw_sector_size (RO) | 37 | hw_sector_size (RO) |
13 | ------------------- | 38 | ------------------- |
14 | This is the hardware sector size of the device, in bytes. | 39 | This is the hardware sector size of the device, in bytes. |
15 | 40 | ||
41 | iostats (RW) | ||
42 | ------------- | ||
43 | This file is used to control (on/off) the iostats accounting of the | ||
44 | disk. | ||
45 | |||
46 | logical_block_size (RO) | ||
47 | ----------------------- | ||
48 | This is the logcal block size of the device, in bytes. | ||
49 | |||
16 | max_hw_sectors_kb (RO) | 50 | max_hw_sectors_kb (RO) |
17 | ---------------------- | 51 | ---------------------- |
18 | This is the maximum number of kilobytes supported in a single data transfer. | 52 | This is the maximum number of kilobytes supported in a single data transfer. |
19 | 53 | ||
54 | max_integrity_segments (RO) | ||
55 | --------------------------- | ||
56 | When read, this file shows the max limit of integrity segments as | ||
57 | set by block layer which a hardware controller can handle. | ||
58 | |||
20 | max_sectors_kb (RW) | 59 | max_sectors_kb (RW) |
21 | ------------------- | 60 | ------------------- |
22 | This is the maximum number of kilobytes that the block layer will allow | 61 | This is the maximum number of kilobytes that the block layer will allow |
23 | for a filesystem request. Must be smaller than or equal to the maximum | 62 | for a filesystem request. Must be smaller than or equal to the maximum |
24 | size allowed by the hardware. | 63 | size allowed by the hardware. |
25 | 64 | ||
65 | max_segments (RO) | ||
66 | ----------------- | ||
67 | Maximum number of segments of the device. | ||
68 | |||
69 | max_segment_size (RO) | ||
70 | --------------------- | ||
71 | Maximum segment size of the device. | ||
72 | |||
73 | minimum_io_size (RO) | ||
74 | -------------------- | ||
75 | This is the smallest preferred io size reported by the device. | ||
76 | |||
26 | nomerges (RW) | 77 | nomerges (RW) |
27 | ------------- | 78 | ------------- |
28 | This enables the user to disable the lookup logic involved with IO | 79 | This enables the user to disable the lookup logic involved with IO |
@@ -45,11 +96,24 @@ per-block-cgroup request pool. IOW, if there are N block cgroups, | |||
45 | each request queue may have upto N request pools, each independently | 96 | each request queue may have upto N request pools, each independently |
46 | regulated by nr_requests. | 97 | regulated by nr_requests. |
47 | 98 | ||
99 | optimal_io_size (RO) | ||
100 | -------------------- | ||
101 | This is the optimal io size reported by the device. | ||
102 | |||
103 | physical_block_size (RO) | ||
104 | ------------------------ | ||
105 | This is the physical block size of device, in bytes. | ||
106 | |||
48 | read_ahead_kb (RW) | 107 | read_ahead_kb (RW) |
49 | ------------------ | 108 | ------------------ |
50 | Maximum number of kilobytes to read-ahead for filesystems on this block | 109 | Maximum number of kilobytes to read-ahead for filesystems on this block |
51 | device. | 110 | device. |
52 | 111 | ||
112 | rotational (RW) | ||
113 | --------------- | ||
114 | This file is used to stat if the device is of rotational type or | ||
115 | non-rotational type. | ||
116 | |||
53 | rq_affinity (RW) | 117 | rq_affinity (RW) |
54 | ---------------- | 118 | ---------------- |
55 | If this option is '1', the block layer will migrate request completions to the | 119 | If this option is '1', the block layer will migrate request completions to the |