aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-15 11:01:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-15 11:01:13 -0400
commit5853b4f06f7b9b56f37f457d7923f7b96496074e (patch)
tree8cf850e91b26af25071f00055fa89fb924796de6 /kernel
parenta970f5d513163a305d46f330d0a7d2dd4c4506f1 (diff)
parentf6603783f9f099bf7a83b3f6c689bbbf74f0e96e (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: only force kblockd unplugging from the schedule() path block: cleanup the block plug helper functions block, blk-sysfs: Use the variable directly instead of a function call block: move queue run on unplug to kblockd block: kill queue_sync_plugs() block: readd plug trace event block: add callback function for unplug notification block: add comment on why we save and disable interrupts in flush_plug_list() block: fixup block IO unplug trace call block: remove block_unplug_timer() trace point block: splice plug list to local context
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/blktrace.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 7aa40f8e182d..3e3970d53d14 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -850,32 +850,19 @@ static void blk_add_trace_plug(void *ignore, struct request_queue *q)
850 __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL); 850 __blk_add_trace(bt, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL);
851} 851}
852 852
853static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q) 853static void blk_add_trace_unplug_io(void *ignore, struct request_queue *q,
854 unsigned int depth)
854{ 855{
855 struct blk_trace *bt = q->blk_trace; 856 struct blk_trace *bt = q->blk_trace;
856 857
857 if (bt) { 858 if (bt) {
858 unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE]; 859 __be64 rpdu = cpu_to_be64(depth);
859 __be64 rpdu = cpu_to_be64(pdu);
860 860
861 __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0, 861 __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0,
862 sizeof(rpdu), &rpdu); 862 sizeof(rpdu), &rpdu);
863 } 863 }
864} 864}
865 865
866static void blk_add_trace_unplug_timer(void *ignore, struct request_queue *q)
867{
868 struct blk_trace *bt = q->blk_trace;
869
870 if (bt) {
871 unsigned int pdu = q->rq.count[READ] + q->rq.count[WRITE];
872 __be64 rpdu = cpu_to_be64(pdu);
873
874 __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_TIMER, 0,
875 sizeof(rpdu), &rpdu);
876 }
877}
878
879static void blk_add_trace_split(void *ignore, 866static void blk_add_trace_split(void *ignore,
880 struct request_queue *q, struct bio *bio, 867 struct request_queue *q, struct bio *bio,
881 unsigned int pdu) 868 unsigned int pdu)
@@ -1015,8 +1002,6 @@ static void blk_register_tracepoints(void)
1015 WARN_ON(ret); 1002 WARN_ON(ret);
1016 ret = register_trace_block_plug(blk_add_trace_plug, NULL); 1003 ret = register_trace_block_plug(blk_add_trace_plug, NULL);
1017 WARN_ON(ret); 1004 WARN_ON(ret);
1018 ret = register_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
1019 WARN_ON(ret);
1020 ret = register_trace_block_unplug_io(blk_add_trace_unplug_io, NULL); 1005 ret = register_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
1021 WARN_ON(ret); 1006 WARN_ON(ret);
1022 ret = register_trace_block_split(blk_add_trace_split, NULL); 1007 ret = register_trace_block_split(blk_add_trace_split, NULL);
@@ -1033,7 +1018,6 @@ static void blk_unregister_tracepoints(void)
1033 unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL); 1018 unregister_trace_block_bio_remap(blk_add_trace_bio_remap, NULL);
1034 unregister_trace_block_split(blk_add_trace_split, NULL); 1019 unregister_trace_block_split(blk_add_trace_split, NULL);
1035 unregister_trace_block_unplug_io(blk_add_trace_unplug_io, NULL); 1020 unregister_trace_block_unplug_io(blk_add_trace_unplug_io, NULL);
1036 unregister_trace_block_unplug_timer(blk_add_trace_unplug_timer, NULL);
1037 unregister_trace_block_plug(blk_add_trace_plug, NULL); 1021 unregister_trace_block_plug(blk_add_trace_plug, NULL);
1038 unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL); 1022 unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
1039 unregister_trace_block_getrq(blk_add_trace_getrq, NULL); 1023 unregister_trace_block_getrq(blk_add_trace_getrq, NULL);
@@ -1348,7 +1332,6 @@ static const struct {
1348 [__BLK_TA_COMPLETE] = {{ "C", "complete" }, blk_log_with_error }, 1332 [__BLK_TA_COMPLETE] = {{ "C", "complete" }, blk_log_with_error },
1349 [__BLK_TA_PLUG] = {{ "P", "plug" }, blk_log_plug }, 1333 [__BLK_TA_PLUG] = {{ "P", "plug" }, blk_log_plug },
1350 [__BLK_TA_UNPLUG_IO] = {{ "U", "unplug_io" }, blk_log_unplug }, 1334 [__BLK_TA_UNPLUG_IO] = {{ "U", "unplug_io" }, blk_log_unplug },
1351 [__BLK_TA_UNPLUG_TIMER] = {{ "UT", "unplug_timer" }, blk_log_unplug },
1352 [__BLK_TA_INSERT] = {{ "I", "insert" }, blk_log_generic }, 1335 [__BLK_TA_INSERT] = {{ "I", "insert" }, blk_log_generic },
1353 [__BLK_TA_SPLIT] = {{ "X", "split" }, blk_log_split }, 1336 [__BLK_TA_SPLIT] = {{ "X", "split" }, blk_log_split },
1354 [__BLK_TA_BOUNCE] = {{ "B", "bounce" }, blk_log_generic }, 1337 [__BLK_TA_BOUNCE] = {{ "B", "bounce" }, blk_log_generic },