diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
commit | ee89f81252179dcbf6cd65bd48299f5e52292d88 (patch) | |
tree | 805846cd12821f84cfe619d44c9e3e36e0b0f9e6 /block/blk-core.c | |
parent | 21f3b24da9328415792efc780f50b9f434c12465 (diff) | |
parent | de33127d8d3f1d570aad8c2223cd81b206636bc1 (diff) |
Merge branch 'for-3.9/core' of git://git.kernel.dk/linux-block
Pull block IO core bits from Jens Axboe:
"Below are the core block IO bits for 3.9. It was delayed a few days
since my workstation kept crashing every 2-8h after pulling it into
current -git, but turns out it is a bug in the new pstate code (divide
by zero, will report separately). In any case, it contains:
- The big cfq/blkcg update from Tejun and and Vivek.
- Additional block and writeback tracepoints from Tejun.
- Improvement of the should sort (based on queues) logic in the plug
flushing.
- _io() variants of the wait_for_completion() interface, using
io_schedule() instead of schedule() to contribute to io wait
properly.
- Various little fixes.
You'll get two trivial merge conflicts, which should be easy enough to
fix up"
Fix up the trivial conflicts due to hlist traversal cleanups (commit
b67bfe0d42ca: "hlist: drop the node parameter from iterators").
* 'for-3.9/core' of git://git.kernel.dk/linux-block: (39 commits)
block: remove redundant check to bd_openers()
block: use i_size_write() in bd_set_size()
cfq: fix lock imbalance with failed allocations
drivers/block/swim3.c: fix null pointer dereference
block: don't select PERCPU_RWSEM
block: account iowait time when waiting for completion of IO request
sched: add wait_for_completion_io[_timeout]
writeback: add more tracepoints
block: add block_{touch|dirty}_buffer tracepoint
buffer: make touch_buffer() an exported function
block: add @req to bio_{front|back}_merge tracepoints
block: add missing block_bio_complete() tracepoint
block: Remove should_sort judgement when flush blk_plug
block,elevator: use new hashtable implementation
cfq-iosched: add hierarchical cfq_group statistics
cfq-iosched: collect stats from dead cfqgs
cfq-iosched: separate out cfqg_stats_reset() from cfq_pd_reset_stats()
blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock
block: RCU free request_queue
blkcg: implement blkg_[rw]stat_recursive_sum() and blkg_[rw]stat_merge()
...
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 277134cb5d32..074b758efc42 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap); | 40 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap); |
41 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); | 41 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); |
42 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); | ||
43 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); | 42 | EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); |
44 | 43 | ||
45 | DEFINE_IDA(blk_queue_ida); | 44 | DEFINE_IDA(blk_queue_ida); |
@@ -1348,7 +1347,7 @@ static bool bio_attempt_back_merge(struct request_queue *q, struct request *req, | |||
1348 | if (!ll_back_merge_fn(q, req, bio)) | 1347 | if (!ll_back_merge_fn(q, req, bio)) |
1349 | return false; | 1348 | return false; |
1350 | 1349 | ||
1351 | trace_block_bio_backmerge(q, bio); | 1350 | trace_block_bio_backmerge(q, req, bio); |
1352 | 1351 | ||
1353 | if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) | 1352 | if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) |
1354 | blk_rq_set_mixed_merge(req); | 1353 | blk_rq_set_mixed_merge(req); |
@@ -1370,7 +1369,7 @@ static bool bio_attempt_front_merge(struct request_queue *q, | |||
1370 | if (!ll_front_merge_fn(q, req, bio)) | 1369 | if (!ll_front_merge_fn(q, req, bio)) |
1371 | return false; | 1370 | return false; |
1372 | 1371 | ||
1373 | trace_block_bio_frontmerge(q, bio); | 1372 | trace_block_bio_frontmerge(q, req, bio); |
1374 | 1373 | ||
1375 | if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) | 1374 | if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) |
1376 | blk_rq_set_mixed_merge(req); | 1375 | blk_rq_set_mixed_merge(req); |
@@ -1553,13 +1552,6 @@ get_rq: | |||
1553 | if (list_empty(&plug->list)) | 1552 | if (list_empty(&plug->list)) |
1554 | trace_block_plug(q); | 1553 | trace_block_plug(q); |
1555 | else { | 1554 | else { |
1556 | if (!plug->should_sort) { | ||
1557 | struct request *__rq; | ||
1558 | |||
1559 | __rq = list_entry_rq(plug->list.prev); | ||
1560 | if (__rq->q != q) | ||
1561 | plug->should_sort = 1; | ||
1562 | } | ||
1563 | if (request_count >= BLK_MAX_REQUEST_COUNT) { | 1555 | if (request_count >= BLK_MAX_REQUEST_COUNT) { |
1564 | blk_flush_plug_list(plug, false); | 1556 | blk_flush_plug_list(plug, false); |
1565 | trace_block_plug(q); | 1557 | trace_block_plug(q); |
@@ -2890,7 +2882,6 @@ void blk_start_plug(struct blk_plug *plug) | |||
2890 | plug->magic = PLUG_MAGIC; | 2882 | plug->magic = PLUG_MAGIC; |
2891 | INIT_LIST_HEAD(&plug->list); | 2883 | INIT_LIST_HEAD(&plug->list); |
2892 | INIT_LIST_HEAD(&plug->cb_list); | 2884 | INIT_LIST_HEAD(&plug->cb_list); |
2893 | plug->should_sort = 0; | ||
2894 | 2885 | ||
2895 | /* | 2886 | /* |
2896 | * If this is a nested plug, don't actually assign it. It will be | 2887 | * If this is a nested plug, don't actually assign it. It will be |
@@ -2992,10 +2983,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) | |||
2992 | 2983 | ||
2993 | list_splice_init(&plug->list, &list); | 2984 | list_splice_init(&plug->list, &list); |
2994 | 2985 | ||
2995 | if (plug->should_sort) { | 2986 | list_sort(NULL, &list, plug_rq_cmp); |
2996 | list_sort(NULL, &list, plug_rq_cmp); | ||
2997 | plug->should_sort = 0; | ||
2998 | } | ||
2999 | 2987 | ||
3000 | q = NULL; | 2988 | q = NULL; |
3001 | depth = 0; | 2989 | depth = 0; |