diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 13:13:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 13:13:35 -0400 |
| commit | 4de13d7aa8f4d02f4dc99d4609575659f92b3c5a (patch) | |
| tree | 3bc9729eabe79c6164cd29a5d605000bc82bf837 | |
| parent | 5af43c24ca59a448c9312dd4a4a51d27ec3b9a73 (diff) | |
| parent | b8d4a5bf6a049303a29a3275f463f09a490b50ea (diff) | |
Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block
Pull block core updates from Jens Axboe:
- Major bit is Kents prep work for immutable bio vecs.
- Stable candidate fix for a scheduling-while-atomic in the queue
bypass operation.
- Fix for the hang on exceeded rq->datalen 32-bit unsigned when merging
discard bios.
- Tejuns changes to convert the writeback thread pool to the generic
workqueue mechanism.
- Runtime PM framework, SCSI patches exists on top of these in James'
tree.
- A few random fixes.
* 'for-3.10/core' of git://git.kernel.dk/linux-block: (40 commits)
relay: move remove_buf_file inside relay_close_buf
partitions/efi.c: replace useless kzalloc's by kmalloc's
fs/block_dev.c: fix iov_shorten() criteria in blkdev_aio_read()
block: fix max discard sectors limit
blkcg: fix "scheduling while atomic" in blk_queue_bypass_start
Documentation: cfq-iosched: update documentation help for cfq tunables
writeback: expose the bdi_wq workqueue
writeback: replace custom worker pool implementation with unbound workqueue
writeback: remove unused bdi_pending_list
aoe: Fix unitialized var usage
bio-integrity: Add explicit field for owner of bip_buf
block: Add an explicit bio flag for bios that own their bvec
block: Add bio_alloc_pages()
block: Convert some code to bio_for_each_segment_all()
block: Add bio_for_each_segment_all()
bounce: Refactor __blk_queue_bounce to not use bi_io_vec
raid1: use bio_copy_data()
pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage
pktcdvd: use bio_copy_data()
block: Add bio_copy_data()
...
50 files changed, 1000 insertions, 956 deletions
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt index a5eb7d19a65d..9887f0414c16 100644 --- a/Documentation/block/cfq-iosched.txt +++ b/Documentation/block/cfq-iosched.txt | |||
| @@ -5,7 +5,7 @@ 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. | 5 | I/O bandwidth for all the processes which requests an I/O operation. |
| 6 | 6 | ||
| 7 | CFQ maintains the per process queue for the processes which request I/O | 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 | 8 | operation(synchronous requests). In case of asynchronous requests, all the |
| 9 | requests from all the processes are batched together according to their | 9 | requests from all the processes are batched together according to their |
| 10 | process's I/O priority. | 10 | process's I/O priority. |
| 11 | 11 | ||
| @@ -66,6 +66,47 @@ 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 | 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. | 67 | one, this value should be decreased relative to fifo_expire_async. |
| 68 | 68 | ||
| 69 | group_idle | ||
| 70 | ----------- | ||
| 71 | This parameter forces idling at the CFQ group level instead of CFQ | ||
| 72 | queue level. This was introduced after after a bottleneck was observed | ||
| 73 | in higher end storage due to idle on sequential queue and allow dispatch | ||
| 74 | from a single queue. The idea with this parameter is that it can be run with | ||
| 75 | slice_idle=0 and group_idle=8, so that idling does not happen on individual | ||
| 76 | queues in the group but happens overall on the group and thus still keeps the | ||
| 77 | IO controller working. | ||
| 78 | Not idling on individual queues in the group will dispatch requests from | ||
| 79 | multiple queues in the group at the same time and achieve higher throughput | ||
| 80 | on higher end storage. | ||
| 81 | |||
| 82 | Default value for this parameter is 8ms. | ||
| 83 | |||
| 84 | latency | ||
| 85 | ------- | ||
| 86 | This parameter is used to enable/disable the latency mode of the CFQ | ||
| 87 | scheduler. If latency mode (called low_latency) is enabled, CFQ tries | ||
| 88 | to recompute the slice time for each process based on the target_latency set | ||
| 89 | for the system. This favors fairness over throughput. Disabling low | ||
| 90 | latency (setting it to 0) ignores target latency, allowing each process in the | ||
| 91 | system to get a full time slice. | ||
| 92 | |||
| 93 | By default low latency mode is enabled. | ||
| 94 | |||
| 95 | target_latency | ||
| 96 | -------------- | ||
| 97 | This parameter is used to calculate the time slice for a process if cfq's | ||
| 98 | latency mode is enabled. It will ensure that sync requests have an estimated | ||
| 99 | latency. But if sequential workload is higher(e.g. sequential read), | ||
| 100 | then to meet the latency constraints, throughput may decrease because of less | ||
| 101 | time for each process to issue I/O request before the cfq queue is switched. | ||
| 102 | |||
| 103 | Though this can be overcome by disabling the latency_mode, it may increase | ||
| 104 | the read latency for some applications. This parameter allows for changing | ||
| 105 | target_latency through the sysfs interface which can provide the balanced | ||
| 106 | throughput and read latency. | ||
| 107 | |||
| 108 | Default value for target_latency is 300ms. | ||
| 109 | |||
| 69 | slice_async | 110 | slice_async |
| 70 | ----------- | 111 | ----------- |
| 71 | This parameter is same as of slice_sync but for asynchronous queue. The | 112 | This parameter is same as of slice_sync but for asynchronous queue. The |
| @@ -98,8 +139,8 @@ in the device exceeds this parameter. This parameter is used for synchronous | |||
| 98 | request. | 139 | request. |
| 99 | 140 | ||
| 100 | In case of storage with several disk, this setting can limit the parallel | 141 | In case of storage with several disk, this setting can limit the parallel |
| 101 | processing of request. Therefore, increasing the value can imporve the | 142 | processing of request. Therefore, increasing the value can improve the |
| 102 | performace although this can cause the latency of some I/O to increase due | 143 | performance although this can cause the latency of some I/O to increase due |
| 103 | to more number of requests. | 144 | to more number of requests. |
| 104 | 145 | ||
| 105 | CFQ Group scheduling | 146 | CFQ Group scheduling |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index b2b9837f9dd3..e8918ffaf96d 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -972,10 +972,10 @@ int blkcg_activate_policy(struct request_queue *q, | |||
| 972 | if (!new_blkg) | 972 | if (!new_blkg) |
| 973 | return -ENOMEM; | 973 | return -ENOMEM; |
| 974 | 974 | ||
| 975 | preloaded = !radix_tree_preload(GFP_KERNEL); | ||
| 976 | |||
| 977 | blk_queue_bypass_start(q); | 975 | blk_queue_bypass_start(q); |
| 978 | 976 | ||
| 977 | preloaded = !radix_tree_preload(GFP_KERNEL); | ||
| 978 | |||
| 979 | /* | 979 | /* |
| 980 | * Make sure the root blkg exists and count the existing blkgs. As | 980 | * Make sure the root blkg exists and count the existing blkgs. As |
| 981 | * @q is bypassing at this point, blkg_lookup_create() can't be | 981 | * @q is bypassing at this point, blkg_lookup_create() can't be |
diff --git a/block/blk-core.c b/block/blk-core.c index 7c288358a745..33c33bc99ddd 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/list_sort.h> | 30 | #include <linux/list_sort.h> |
| 31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
| 32 | #include <linux/ratelimit.h> | 32 | #include <linux/ratelimit.h> |
| 33 | #include <linux/pm_runtime.h> | ||
| 33 | 34 | ||
| 34 | #define CREATE_TRACE_POINTS | 35 | #define CREATE_TRACE_POINTS |
| 35 | #include <trace/events/block.h> | 36 | #include <trace/events/block.h> |
| @@ -159,20 +160,10 @@ static void req_bio_endio(struct request *rq, struct bio *bio, | |||
| 159 | else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) | 160 | els |
