* block tracepoint cleanups v2
@ 2020-12-03 16:21 Christoph Hellwig
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
` (5 more replies)
0 siblings, 6 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe; +Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390
Hi Jens,
this series cleans up the block layer tracepoints by removing unused
tracepoints or tracepoint arguments and consolidating the implementation
of various bio based tracepoints.
Changes since v1:
- a few commit log typo fixes and improvements
Diffstat:
block/blk-core.c | 4
block/blk-merge.c | 8 -
block/blk-mq-sched.c | 2
block/blk-mq.c | 10 -
block/bounce.c | 2
drivers/md/dm-rq.c | 2
drivers/md/dm.c | 5
drivers/md/md-linear.c | 3
drivers/md/md.c | 5
drivers/md/raid0.c | 4
drivers/md/raid1.c | 7 -
drivers/md/raid10.c | 6 -
drivers/md/raid5.c | 15 +-
drivers/nvme/host/multipath.c | 3
drivers/s390/scsi/zfcp_fsf.c | 3
include/linux/blktrace_api.h | 5
include/trace/events/block.h | 228 +++++++++---------------------------------
kernel/trace/blktrace.c | 126 ++++++-----------------
18 files changed, 125 insertions(+), 313 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/5] block: remove the unused block_sleeprq tracepoint
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
@ 2020-12-03 16:21 ` Christoph Hellwig
2020-12-03 19:45 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class Christoph Hellwig
` (4 subsequent siblings)
5 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
The block_sleeprq tracepoint was only used by the legacy request code.
Remove it now that the legacy request code is gone.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
include/trace/events/block.h | 18 ------------------
kernel/trace/blktrace.c | 22 ----------------------
2 files changed, 40 deletions(-)
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 34d64ca306b1c7..76459cf750e14d 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -441,24 +441,6 @@ DEFINE_EVENT(block_get_rq, block_getrq,
TP_ARGS(q, bio, rw)
);
-/**
- * block_sleeprq - waiting to get a free request entry in queue for block IO operation
- * @q: queue for operation
- * @bio: pending block IO operation (can be %NULL)
- * @rw: low bit indicates a read (%0) or a write (%1)
- *
- * In the case where a request struct cannot be provided for queue @q
- * the process needs to wait for an request struct to become
- * available. This tracepoint event is generated each time the
- * process goes to sleep waiting for request struct become available.
- */
-DEFINE_EVENT(block_get_rq, block_sleeprq,
-
- TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
-
- TP_ARGS(q, bio, rw)
-);
-
/**
* block_plug - keep operations requests in request queue
* @q: request queue to plug
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index a482a37848bff7..ced589df304b57 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -959,25 +959,6 @@ static void blk_add_trace_getrq(void *ignore,
}
}
-
-static void blk_add_trace_sleeprq(void *ignore,
- struct request_queue *q,
- struct bio *bio, int rw)
-{
- if (bio)
- blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ, 0);
- else {
- struct blk_trace *bt;
-
- rcu_read_lock();
- bt = rcu_dereference(q->blk_trace);
- if (bt)
- __blk_add_trace(bt, 0, 0, rw, 0, BLK_TA_SLEEPRQ,
- 0, 0, NULL, 0);
- rcu_read_unlock();
- }
-}
-
static void blk_add_trace_plug(void *ignore, struct request_queue *q)
{
struct blk_trace *bt;
@@ -1164,8 +1145,6 @@ static void blk_register_tracepoints(void)
WARN_ON(ret);
ret = register_trace_block_getrq(blk_add_trace_getrq, NULL);
WARN_ON(ret);
- ret = register_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
- WARN_ON(ret);
ret = register_trace_block_plug(blk_add_trace_plug, NULL);
WARN_ON(ret);
ret = register_trace_block_unplug(blk_add_trace_unplug, NULL);
@@ -1185,7 +1164,6 @@ static void blk_unregister_tracepoints(void)
unregister_trace_block_split(blk_add_trace_split, NULL);
unregister_trace_block_unplug(blk_add_trace_unplug, NULL);
unregister_trace_block_plug(blk_add_trace_plug, NULL);
- unregister_trace_block_sleeprq(blk_add_trace_sleeprq, NULL);
unregister_trace_block_getrq(blk_add_trace_getrq, NULL);
unregister_trace_block_bio_queue(blk_add_trace_bio_queue, NULL);
unregister_trace_block_bio_frontmerge(blk_add_trace_bio_frontmerge, NULL);
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
@ 2020-12-03 16:21 ` Christoph Hellwig
2020-12-03 20:05 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
` (3 subsequent siblings)
5 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
The block_bio_merge tracepoint class can be reused for most bio-based
tracepoints. For that it just needs to lose the superfluous q and rq
parameters.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
block/blk-core.c | 2 +-
block/blk-merge.c | 4 +-
block/blk-mq.c | 2 +-
block/bounce.c | 2 +-
include/trace/events/block.h | 158 ++++++++---------------------------
kernel/trace/blktrace.c | 41 +++------
6 files changed, 48 insertions(+), 161 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index cee568389b7e11..cb24654983e1e4 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -907,7 +907,7 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio)
blkcg_bio_issue_init(bio);
if (!bio_flagged(bio, BIO_TRACE_COMPLETION)) {
- trace_block_bio_queue(q, bio);
+ trace_block_bio_queue(bio);
/* Now that enqueuing has been traced, we need to trace
* completion as well.
*/
diff --git a/block/blk-merge.c b/block/blk-merge.c
index cb351ab9b77dbd..1a46d5bbd399e3 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -922,7 +922,7 @@ static enum bio_merge_status bio_attempt_back_merge(struct request *req,
if (!ll_back_merge_fn(req, bio, nr_segs))
return BIO_MERGE_FAILED;
- trace_block_bio_backmerge(req->q, req, bio);
+ trace_block_bio_backmerge(bio);
rq_qos_merge(req->q, req, bio);
if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff)
@@ -946,7 +946,7 @@ static enum bio_merge_status bio_attempt_front_merge(struct request *req,
if (!ll_front_merge_fn(req, bio, nr_segs))
return BIO_MERGE_FAILED;
- trace_block_bio_frontmerge(req->q, req, bio);
+ trace_block_bio_frontmerge(bio);
rq_qos_merge(req->q, req, bio);
if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ce6cd12aeda54e..26eaf476f1e12b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2184,7 +2184,7 @@ blk_qc_t blk_mq_submit_bio(struct bio *bio)
goto queue_exit;
}
- trace_block_getrq(q, bio, bio->bi_opf);
+ trace_block_getrq(bio);
rq_qos_track(q, rq, bio);
diff --git a/block/bounce.c b/block/bounce.c
index 162a6eee89996a..d3f51acd6e3b51 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -340,7 +340,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,
}
}
- trace_block_bio_bounce(q, *bio_orig);
+ trace_block_bio_bounce(*bio_orig);
bio->bi_flags |= (1 << BIO_BOUNCED);
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 76459cf750e14d..506c29dc7c76fd 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -226,45 +226,6 @@ DEFINE_EVENT(block_rq, block_rq_merge,
TP_ARGS(q, rq)
);
-/**
- * block_bio_bounce - used bounce buffer when processing block operation
- * @q: queue holding the block operation
- * @bio: block operation
- *
- * A bounce buffer was used to handle the block operation @bio in @q.
- * This occurs when hardware limitations prevent a direct transfer of
- * data between the @bio data memory area and the IO device. Use of a
- * bounce buffer requires extra copying of data and decreases
- * performance.
- */
-TRACE_EVENT(block_bio_bounce,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio),
-
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( sector_t, sector )
- __field( unsigned int, nr_sector )
- __array( char, rwbs, RWBS_LEN )
- __array( char, comm, TASK_COMM_LEN )
- ),
-
- TP_fast_assign(
- __entry->dev = bio_dev(bio);
- __entry->sector = bio->bi_iter.bi_sector;
- __entry->nr_sector = bio_sectors(bio);
- blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
- memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
- ),
-
- TP_printk("%d,%d %s %llu + %u [%s]",
- MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
- (unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm)
-);
-
/**
* block_bio_complete - completed all work on the block operation
* @q: queue holding the block operation
@@ -301,11 +262,11 @@ TRACE_EVENT(block_bio_complete,
__entry->nr_sector, __entry->error)
);
-DECLARE_EVENT_CLASS(block_bio_merge,
+DECLARE_EVENT_CLASS(block_bio,
- TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
+ TP_PROTO(struct bio *bio),
- TP_ARGS(q, rq, bio),
+ TP_ARGS(bio),
TP_STRUCT__entry(
__field( dev_t, dev )
@@ -329,116 +290,63 @@ DECLARE_EVENT_CLASS(block_bio_merge,
__entry->nr_sector, __entry->comm)
);
+/**
+ * block_bio_bounce - used bounce buffer when processing block operation
+ * @bio: block operation
+ *
+ * A bounce buffer was used to handle the block operation @bio in @q.
+ * This occurs when hardware limitations prevent a direct transfer of
+ * data between the @bio data memory area and the IO device. Use of a
+ * bounce buffer requires extra copying of data and decreases
+ * performance.
+ */
+DEFINE_EVENT(block_bio, block_bio_bounce,
+ TP_PROTO(struct bio *bio),
+ TP_ARGS(bio)
+);
+
/**
* block_bio_backmerge - merging block operation to the end of an existing operation
- * @q: queue holding operation
- * @rq: request bio is being merged into
* @bio: new block operation to merge
*
- * Merging block request @bio to the end of an existing block request
- * in queue @q.
+ * Merging block request @bio to the end of an existing block request.
*/
-DEFINE_EVENT(block_bio_merge, block_bio_backmerge,
-
- TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
-
- TP_ARGS(q, rq, bio)
+DEFINE_EVENT(block_bio, block_bio_backmerge,
+ TP_PROTO(struct bio *bio),
+ TP_ARGS(bio)
);
/**
* block_bio_frontmerge - merging block operation to the beginning of an existing operation
- * @q: queue holding operation
- * @rq: request bio is being merged into
* @bio: new block operation to merge
*
- * Merging block IO operation @bio to the beginning of an existing block
- * operation in queue @q.
+ * Merging block IO operation @bio to the beginning of an existing block request.
*/
-DEFINE_EVENT(block_bio_merge, block_bio_frontmerge,
-
- TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
-
- TP_ARGS(q, rq, bio)
+DEFINE_EVENT(block_bio, block_bio_frontmerge,
+ TP_PROTO(struct bio *bio),
+ TP_ARGS(bio)
);
/**
* block_bio_queue - putting new block IO operation in queue
- * @q: queue holding operation
* @bio: new block operation
*
* About to place the block IO operation @bio into queue @q.
*/
-TRACE_EVENT(block_bio_queue,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio),
-
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( sector_t, sector )
- __field( unsigned int, nr_sector )
- __array( char, rwbs, RWBS_LEN )
- __array( char, comm, TASK_COMM_LEN )
- ),
-
- TP_fast_assign(
- __entry->dev = bio_dev(bio);
- __entry->sector = bio->bi_iter.bi_sector;
- __entry->nr_sector = bio_sectors(bio);
- blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
- memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
- ),
-
- TP_printk("%d,%d %s %llu + %u [%s]",
- MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
- (unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm)
-);
-
-DECLARE_EVENT_CLASS(block_get_rq,
-
- TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
-
- TP_ARGS(q, bio, rw),
-
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( sector_t, sector )
- __field( unsigned int, nr_sector )
- __array( char, rwbs, RWBS_LEN )
- __array( char, comm, TASK_COMM_LEN )
- ),
-
- TP_fast_assign(
- __entry->dev = bio ? bio_dev(bio) : 0;
- __entry->sector = bio ? bio->bi_iter.bi_sector : 0;
- __entry->nr_sector = bio ? bio_sectors(bio) : 0;
- blk_fill_rwbs(__entry->rwbs,
- bio ? bio->bi_opf : 0, __entry->nr_sector);
- memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
- ),
-
- TP_printk("%d,%d %s %llu + %u [%s]",
- MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
- (unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm)
+DEFINE_EVENT(block_bio, block_bio_queue,
+ TP_PROTO(struct bio *bio),
+ TP_ARGS(bio)
);
/**
* block_getrq - get a free request entry in queue for block IO operations
- * @q: queue for operations
* @bio: pending block IO operation (can be %NULL)
- * @rw: low bit indicates a read (%0) or a write (%1)
*
- * A request struct for queue @q has been allocated to handle the
- * block IO operation @bio.
+ * A request struct has been allocated to handle the block IO operation @bio.
*/
-DEFINE_EVENT(block_get_rq, block_getrq,
-
- TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
-
- TP_ARGS(q, bio, rw)
+DEFINE_EVENT(block_bio, block_getrq,
+ TP_PROTO(struct bio *bio),
+ TP_ARGS(bio)
);
/**
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index ced589df304b57..7ab88e00c15765 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -906,10 +906,9 @@ static void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
rcu_read_unlock();
}
-static void blk_add_trace_bio_bounce(void *ignore,
- struct request_queue *q, struct bio *bio)
+static void blk_add_trace_bio_bounce(void *ignore, struct bio *bio)
{
- blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0);
+ blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_BOUNCE, 0);
}
static void blk_add_trace_bio_complete(void *ignore,
@@ -919,44 +918,24 @@ static void blk_add_trace_bio_complete(void *ignore,
blk_status_to_errno(bio->bi_status));
}
-static void blk_add_trace_bio_backmerge(void *ignore,
- struct request_queue *q,
- struct request *rq,
- struct bio *bio)
+static void blk_add_trace_bio_backmerge(void *ignore, struct bio *bio)
{
- blk_add_trace_bio(q, bio, BLK_TA_BACKMERGE, 0);
+ blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_BACKMERGE, 0);
}
-static void blk_add_trace_bio_frontmerge(void *ignore,
- struct request_queue *q,
- struct request *rq,
- struct bio *bio)
+static void blk_add_trace_bio_frontmerge(void *ignore, struct bio *bio)
{
- blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE, 0);
+ blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_FRONTMERGE, 0);
}
-static void blk_add_trace_bio_queue(void *ignore,
- struct request_queue *q, struct bio *bio)
+static void blk_add_trace_bio_queue(void *ignore, struct bio *bio)
{
- blk_add_trace_bio(q, bio, BLK_TA_QUEUE, 0);
+ blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_QUEUE, 0);
}
-static void blk_add_trace_getrq(void *ignore,
- struct request_queue *q,
- struct bio *bio, int rw)
+static void blk_add_trace_getrq(void *ignore, struct bio *bio)
{
- if (bio)
- blk_add_trace_bio(q, bio, BLK_TA_GETRQ, 0);
- else {
- struct blk_trace *bt;
-
- rcu_read_lock();
- bt = rcu_dereference(q->blk_trace);
- if (bt)
- __blk_add_trace(bt, 0, 0, rw, 0, BLK_TA_GETRQ, 0, 0,
- NULL, 0);
- rcu_read_unlock();
- }
+ blk_add_trace_bio(bio->bi_disk->queue, bio, BLK_TA_GETRQ, 0);
}
static void blk_add_trace_plug(void *ignore, struct request_queue *q)
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
2020-12-03 16:21 ` [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class Christoph Hellwig
@ 2020-12-03 16:21 ` Christoph Hellwig
2020-12-03 20:06 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig
` (2 subsequent siblings)
5 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
The request_queue can trivially be derived from the bio.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
block/blk-merge.c | 2 +-
drivers/md/dm.c | 2 +-
include/trace/events/block.h | 14 ++++++--------
kernel/trace/blktrace.c | 5 ++---
4 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 1a46d5bbd399e3..4071daa88a5eaf 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
split->bi_opf |= REQ_NOMERGE;
bio_chain(split, *bio);
- trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
+ trace_block_split(split, (*bio)->bi_iter.bi_sector);
submit_bio_noacct(*bio);
*bio = split;
}
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index ed7e836efbcdbc..9a5bd90779c7c4 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
part_stat_unlock();
bio_chain(b, bio);
- trace_block_split(md->queue, b, bio->bi_iter.bi_sector);
+ trace_block_split(b, bio->bi_iter.bi_sector);
ret = submit_bio_noacct(bio);
break;
}
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 506c29dc7c76fd..b415e4cba84304 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug,
/**
* block_split - split a single bio struct into two bio structs
- * @q: queue containing the bio
* @bio: block operation being split
* @new_sector: The starting sector for the new bio
*
- * The bio request @bio in request queue @q needs to be split into two
- * bio requests. The newly created @bio request starts at
- * @new_sector. This split may be required due to hardware limitation
- * such as operation crossing device boundaries in a RAID system.
+ * The bio request @bio needs to be split into two bio requests. The newly
+ * created @bio request starts at @new_sector. This split may be required due to
+ * hardware limitations such as operation crossing device boundaries in a RAID
+ * system.
*/
TRACE_EVENT(block_split,
- TP_PROTO(struct request_queue *q, struct bio *bio,
- unsigned int new_sector),
+ TP_PROTO(struct bio *bio, unsigned int new_sector),
- TP_ARGS(q, bio, new_sector),
+ TP_ARGS(bio, new_sector),
TP_STRUCT__entry(
__field( dev_t, dev )
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 7ab88e00c15765..3ca6d62114f461 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
rcu_read_unlock();
}
-static void blk_add_trace_split(void *ignore,
- struct request_queue *q, struct bio *bio,
- unsigned int pdu)
+static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
{
+ struct request_queue *q = bio->bi_disk->queue;
struct blk_trace *bt;
rcu_read_lock();
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
` (2 preceding siblings ...)
2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
@ 2020-12-03 16:21 ` Christoph Hellwig
2020-12-03 20:07 ` Tejun Heo
2020-12-04 3:27 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig
2020-12-04 16:42 ` block tracepoint cleanups v2 Jens Axboe
5 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
The request_queue can trivially be derived from the bio.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
block/blk-core.c | 2 +-
drivers/md/dm.c | 3 +--
drivers/md/md-linear.c | 3 +--
drivers/md/md.c | 5 ++---
drivers/md/raid0.c | 4 ++--
drivers/md/raid1.c | 7 +++----
drivers/md/raid10.c | 6 ++----
drivers/md/raid5.c | 15 +++++++--------
drivers/nvme/host/multipath.c | 3 +--
include/trace/events/block.h | 8 +++-----
kernel/trace/blktrace.c | 14 +++++---------
11 files changed, 28 insertions(+), 42 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index cb24654983e1e4..96e5fcd7f071b6 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -758,7 +758,7 @@ static inline int blk_partition_remap(struct bio *bio)
if (bio_check_eod(bio, bdev_nr_sectors(p)))
goto out;
bio->bi_iter.bi_sector += p->bd_start_sect;
- trace_block_bio_remap(bio->bi_disk->queue, bio, p->bd_dev,
+ trace_block_bio_remap(bio, p->bd_dev,
bio->bi_iter.bi_sector -
p->bd_start_sect);
}
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 9a5bd90779c7c4..5181907dc59537 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1276,8 +1276,7 @@ static blk_qc_t __map_bio(struct dm_target_io *tio)
break;
case DM_MAPIO_REMAPPED:
/* the bio has been remapped so dispatch it */
- trace_block_bio_remap(clone->bi_disk->queue, clone,
- bio_dev(io->orig_bio), sector);
+ trace_block_bio_remap(clone, bio_dev(io->orig_bio), sector);
ret = submit_bio_noacct(clone);
break;
case DM_MAPIO_KILL:
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
index 98f1b4b2bdcef8..68cac7d1927823 100644
--- a/drivers/md/md-linear.c
+++ b/drivers/md/md-linear.c
@@ -257,8 +257,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
bio_endio(bio);
} else {
if (mddev->gendisk)
- trace_block_bio_remap(bio->bi_disk->queue,
- bio, disk_devt(mddev->gendisk),
+ trace_block_bio_remap(bio, disk_devt(mddev->gendisk),
bio_sector);
mddev_check_writesame(mddev, bio);
mddev_check_write_zeroes(mddev, bio);
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0065736f05b428..c555be0a8dce78 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8591,9 +8591,8 @@ void md_submit_discard_bio(struct mddev *mddev, struct md_rdev *rdev,
bio_chain(discard_bio, bio);
bio_clone_blkg_association(discard_bio, bio);
if (mddev->gendisk)
- trace_block_bio_remap(bdev_get_queue(rdev->bdev),
- discard_bio, disk_devt(mddev->gendisk),
- bio->bi_iter.bi_sector);
+ trace_block_bio_remap(discard_bio, disk_devt(mddev->gendisk),
+ bio->bi_iter.bi_sector);
submit_bio_noacct(discard_bio);
}
EXPORT_SYMBOL(md_submit_discard_bio);
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 6f44177593a552..e5d7411cba9b46 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -571,8 +571,8 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
tmp_dev->data_offset;
if (mddev->gendisk)
- trace_block_bio_remap(bio->bi_disk->queue, bio,
- disk_devt(mddev->gendisk), bio_sector);
+ trace_block_bio_remap(bio, disk_devt(mddev->gendisk),
+ bio_sector);
mddev_check_writesame(mddev, bio);
mddev_check_write_zeroes(mddev, bio);
submit_bio_noacct(bio);
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 960d854c07f897..c0347997f6ff73 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1305,8 +1305,8 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio,
read_bio->bi_private = r1_bio;
if (mddev->gendisk)
- trace_block_bio_remap(read_bio->bi_disk->queue, read_bio,
- disk_devt(mddev->gendisk), r1_bio->sector);
+ trace_block_bio_remap(read_bio, disk_devt(mddev->gendisk),
+ r1_bio->sector);
submit_bio_noacct(read_bio);
}
@@ -1517,8 +1517,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
atomic_inc(&r1_bio->remaining);
if (mddev->gendisk)
- trace_block_bio_remap(mbio->bi_disk->queue,
- mbio, disk_devt(mddev->gendisk),
+ trace_block_bio_remap(mbio, disk_devt(mddev->gendisk),
r1_bio->sector);
/* flush_pending_writes() needs access to the rdev so...*/
mbio->bi_disk = (void *)conf->mirrors[i].rdev;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index b7bca6703df814..a6f99fa0b32cfc 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1200,8 +1200,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio,
read_bio->bi_private = r10_bio;
if (mddev->gendisk)
- trace_block_bio_remap(read_bio->bi_disk->queue,
- read_bio, disk_devt(mddev->gendisk),
+ trace_block_bio_remap(read_bio, disk_devt(mddev->gendisk),
r10_bio->sector);
submit_bio_noacct(read_bio);
return;
@@ -1250,8 +1249,7 @@ static void raid10_write_one_disk(struct mddev *mddev, struct r10bio *r10_bio,
mbio->bi_private = r10_bio;
if (conf->mddev->gendisk)
- trace_block_bio_remap(mbio->bi_disk->queue,
- mbio, disk_devt(conf->mddev->gendisk),
+ trace_block_bio_remap(mbio, disk_devt(conf->mddev->gendisk),
r10_bio->sector);
/* flush_pending_writes() needs access to the rdev so...*/
mbio->bi_disk = (void *)rdev;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 39343479ac2a94..3a90cc0e43ca8e 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1222,9 +1222,9 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
set_bit(R5_DOUBLE_LOCKED, &sh->dev[i].flags);
if (conf->mddev->gendisk)
- trace_block_bio_remap(bi->bi_disk->queue,
- bi, disk_devt(conf->mddev->gendisk),
- sh->dev[i].sector);
+ trace_block_bio_remap(bi,
+ disk_devt(conf->mddev->gendisk),
+ sh->dev[i].sector);
if (should_defer && op_is_write(op))
bio_list_add(&pending_bios, bi);
else
@@ -1272,9 +1272,9 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
if (op == REQ_OP_DISCARD)
rbi->bi_vcnt = 0;
if (conf->mddev->gendisk)
- trace_block_bio_remap(rbi->bi_disk->queue,
- rbi, disk_devt(conf->mddev->gendisk),
- sh->dev[i].sector);
+ trace_block_bio_remap(rbi,
+ disk_devt(conf->mddev->gendisk),
+ sh->dev[i].sector);
if (should_defer && op_is_write(op))
bio_list_add(&pending_bios, rbi);
else
@@ -5468,8 +5468,7 @@ static int raid5_read_one_chunk(struct mddev *mddev, struct bio *raid_bio)
spin_unlock_irq(&conf->device_lock);
if (mddev->gendisk)
- trace_block_bio_remap(align_bi->bi_disk->queue,
- align_bi, disk_devt(mddev->gendisk),
+ trace_block_bio_remap(align_bi, disk_devt(mddev->gendisk),
raid_bio->bi_iter.bi_sector);
submit_bio_noacct(align_bi);
return 1;
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 74896be40c1769..106cf5c44ee7ab 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -312,8 +312,7 @@ blk_qc_t nvme_ns_head_submit_bio(struct bio *bio)
if (likely(ns)) {
bio->bi_disk = ns->disk;
bio->bi_opf |= REQ_NVME_MPATH;
- trace_block_bio_remap(bio->bi_disk->queue, bio,
- disk_devt(ns->head->disk),
+ trace_block_bio_remap(bio, disk_devt(ns->head->disk),
bio->bi_iter.bi_sector);
ret = submit_bio_noacct(bio);
} else if (nvme_available_path(head)) {
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index b415e4cba84304..8fb89574d8677f 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -450,9 +450,8 @@ TRACE_EVENT(block_split,
/**
* block_bio_remap - map request for a logical device to the raw device
- * @q: queue holding the operation
* @bio: revised operation
- * @dev: device for the operation
+ * @dev: original device for the operation
* @from: original sector for the operation
*
* An operation for a logical device has been mapped to the
@@ -460,10 +459,9 @@ TRACE_EVENT(block_split,
*/
TRACE_EVENT(block_bio_remap,
- TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
- sector_t from),
+ TP_PROTO(struct bio *bio, dev_t dev, sector_t from),
- TP_ARGS(q, bio, dev, from),
+ TP_ARGS(bio, dev, from),
TP_STRUCT__entry(
__field( dev_t, dev )
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 3ca6d62114f461..405637144a0389 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -993,20 +993,16 @@ static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
/**
* blk_add_trace_bio_remap - Add a trace for a bio-remap operation
* @ignore: trace callback data parameter (not used)
- * @q: queue the io is for
* @bio: the source bio
- * @dev: target device
+ * @dev: source device
* @from: source sector
*
- * Description:
- * Device mapper or raid target sometimes need to split a bio because
- * it spans a stripe (or similar). Add a trace for that action.
- *
+ * Called after a bio is remapped to a different device and/or sector.
**/
-static void blk_add_trace_bio_remap(void *ignore,
- struct request_queue *q, struct bio *bio,
- dev_t dev, sector_t from)
+static void blk_add_trace_bio_remap(void *ignore, struct bio *bio, dev_t dev,
+ sector_t from)
{
+ struct request_queue *q = bio->bi_disk->queue;
struct blk_trace *bt;
struct blk_io_trace_remap r;
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/5] block: remove the request_queue to argument request based tracepoints
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
` (3 preceding siblings ...)
2020-12-03 16:21 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig
@ 2020-12-03 16:21 ` Christoph Hellwig
2020-12-03 20:10 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
2020-12-04 16:42 ` block tracepoint cleanups v2 Jens Axboe
5 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-12-03 16:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
The request_queue can trivially be derived from the request.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
block/blk-merge.c | 2 +-
block/blk-mq-sched.c | 2 +-
block/blk-mq.c | 8 +++----
drivers/md/dm-rq.c | 2 +-
drivers/s390/scsi/zfcp_fsf.c | 3 +--
include/linux/blktrace_api.h | 5 ++--
include/trace/events/block.h | 30 ++++++++++--------------
kernel/trace/blktrace.c | 44 ++++++++++++++----------------------
8 files changed, 39 insertions(+), 57 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 4071daa88a5eaf..7497d86fff3834 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -799,7 +799,7 @@ static struct request *attempt_merge(struct request_queue *q,
*/
blk_account_io_merge_request(next);
- trace_block_rq_merge(q, next);
+ trace_block_rq_merge(next);
/*
* ownership of bio passed from next to req, return 'next' for
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index d1eafe2c045caa..deff4e826e234d 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -386,7 +386,7 @@ EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);
void blk_mq_sched_request_inserted(struct request *rq)
{
- trace_block_rq_insert(rq->q, rq);
+ trace_block_rq_insert(rq);
}
EXPORT_SYMBOL_GPL(blk_mq_sched_request_inserted);
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 26eaf476f1e12b..ed21218188da65 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -733,7 +733,7 @@ void blk_mq_start_request(struct request *rq)
{
struct request_queue *q = rq->q;
- trace_block_rq_issue(q, rq);
+ trace_block_rq_issue(rq);
if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
rq->io_start_time_ns = ktime_get_ns();
@@ -760,7 +760,7 @@ static void __blk_mq_requeue_request(struct request *rq)
blk_mq_put_driver_tag(rq);
- trace_block_rq_requeue(q, rq);
+ trace_block_rq_requeue(rq);
rq_qos_requeue(q, rq);
if (blk_mq_request_started(rq)) {
@@ -1821,7 +1821,7 @@ static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx,
lockdep_assert_held(&ctx->lock);
- trace_block_rq_insert(hctx->queue, rq);
+ trace_block_rq_insert(rq);
if (at_head)
list_add(&rq->queuelist, &ctx->rq_lists[type]);
@@ -1878,7 +1878,7 @@ void blk_mq_insert_requests(struct blk_mq_hw_ctx *hctx, struct blk_mq_ctx *ctx,
*/
list_for_each_entry(rq, list, queuelist) {
BUG_ON(rq->mq_ctx != ctx);
- trace_block_rq_insert(hctx->queue, rq);
+ trace_block_rq_insert(rq);
}
spin_lock(&ctx->lock);
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 729a72ec30ccae..13b4385f4d5a92 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -397,7 +397,7 @@ static int map_request(struct dm_rq_target_io *tio)
}
/* The target has remapped the I/O so dispatch it */
- trace_block_rq_remap(clone->q, clone, disk_devt(dm_disk(md)),
+ trace_block_rq_remap(clone, disk_devt(dm_disk(md)),
blk_rq_pos(rq));
ret = dm_dispatch_clone_request(clone, rq);
if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE) {
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 6cb963a0677714..37d450f4695281 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2359,8 +2359,7 @@ static void zfcp_fsf_req_trace(struct zfcp_fsf_req *req, struct scsi_cmnd *scsi)
}
}
- blk_add_driver_data(scsi->request->q, scsi->request, &blktrc,
- sizeof(blktrc));
+ blk_add_driver_data(scsi->request, &blktrc, sizeof(blktrc));
}
/**
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 3b6ff5902edce6..05556573b896a2 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -75,8 +75,7 @@ static inline bool blk_trace_note_message_enabled(struct request_queue *q)
return ret;
}
-extern void blk_add_driver_data(struct request_queue *q, struct request *rq,
- void *data, size_t len);
+extern void blk_add_driver_data(struct request *rq, void *data, size_t len);
extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
struct block_device *bdev,
char __user *arg);
@@ -90,7 +89,7 @@ extern struct attribute_group blk_trace_attr_group;
#else /* !CONFIG_BLK_DEV_IO_TRACE */
# define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY)
# define blk_trace_shutdown(q) do { } while (0)
-# define blk_add_driver_data(q, rq, data, len) do {} while (0)
+# define blk_add_driver_data(rq, data, len) do {} while (0)
# define blk_trace_setup(q, name, dev, bdev, arg) (-ENOTTY)
# define blk_trace_startstop(q, start) (-ENOTTY)
# define blk_trace_remove(q) (-ENOTTY)
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 8fb89574d8677f..0d782663a005dc 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -64,7 +64,6 @@ DEFINE_EVENT(block_buffer, block_dirty_buffer,
/**
* block_rq_requeue - place block IO request back on a queue
- * @q: queue holding operation
* @rq: block IO operation request
*
* The block operation request @rq is being placed back into queue
@@ -73,9 +72,9 @@ DEFINE_EVENT(block_buffer, block_dirty_buffer,
*/
TRACE_EVENT(block_rq_requeue,
- TP_PROTO(struct request_queue *q, struct request *rq),
+ TP_PROTO(struct request *rq),
- TP_ARGS(q, rq),
+ TP_ARGS(rq),
TP_STRUCT__entry(
__field( dev_t, dev )
@@ -147,9 +146,9 @@ TRACE_EVENT(block_rq_complete,
DECLARE_EVENT_CLASS(block_rq,
- TP_PROTO(struct request_queue *q, struct request *rq),
+ TP_PROTO(struct request *rq),
- TP_ARGS(q, rq),
+ TP_ARGS(rq),
TP_STRUCT__entry(
__field( dev_t, dev )
@@ -181,7 +180,6 @@ DECLARE_EVENT_CLASS(block_rq,
/**
* block_rq_insert - insert block operation request into queue
- * @q: target queue
* @rq: block IO operation request
*
* Called immediately before block operation request @rq is inserted
@@ -191,14 +189,13 @@ DECLARE_EVENT_CLASS(block_rq,
*/
DEFINE_EVENT(block_rq, block_rq_insert,
- TP_PROTO(struct request_queue *q, struct request *rq),
+ TP_PROTO(struct request *rq),
- TP_ARGS(q, rq)
+ TP_ARGS(rq)
);
/**
* block_rq_issue - issue pending block IO request operation to device driver
- * @q: queue holding operation
* @rq: block IO operation operation request
*
* Called when block operation request @rq from queue @q is sent to a
@@ -206,14 +203,13 @@ DEFINE_EVENT(block_rq, block_rq_insert,
*/
DEFINE_EVENT(block_rq, block_rq_issue,
- TP_PROTO(struct request_queue *q, struct request *rq),
+ TP_PROTO(struct request *rq),
- TP_ARGS(q, rq)
+ TP_ARGS(rq)
);
/**
* block_rq_merge - merge request with another one in the elevator
- * @q: queue holding operation
* @rq: block IO operation operation request
*
* Called when block operation request @rq from queue @q is merged to another
@@ -221,9 +217,9 @@ DEFINE_EVENT(block_rq, block_rq_issue,
*/
DEFINE_EVENT(block_rq, block_rq_merge,
- TP_PROTO(struct request_queue *q, struct request *rq),
+ TP_PROTO(struct request *rq),
- TP_ARGS(q, rq)
+ TP_ARGS(rq)
);
/**
@@ -491,7 +487,6 @@ TRACE_EVENT(block_bio_remap,
/**
* block_rq_remap - map request for a block operation request
- * @q: queue holding the operation
* @rq: block IO operation request
* @dev: device for the operation
* @from: original sector for the operation
@@ -502,10 +497,9 @@ TRACE_EVENT(block_bio_remap,
*/
TRACE_EVENT(block_rq_remap,
- TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev,
- sector_t from),
+ TP_PROTO(struct request *rq, dev_t dev, sector_t from),
- TP_ARGS(q, rq, dev, from),
+ TP_ARGS(rq, dev, from),
TP_STRUCT__entry(
__field( dev_t, dev )
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 405637144a0389..7839a78205c243 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -795,12 +795,12 @@ static u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
#endif
static u64
-blk_trace_request_get_cgid(struct request_queue *q, struct request *rq)
+blk_trace_request_get_cgid(struct request *rq)
{
if (!rq->bio)
return 0;
/* Use the first bio */
- return blk_trace_bio_get_cgid(q, rq->bio);
+ return blk_trace_bio_get_cgid(rq->q, rq->bio);
}
/*
@@ -841,40 +841,35 @@ static void blk_add_trace_rq(struct request *rq, int error,
rcu_read_unlock();
}
-static void blk_add_trace_rq_insert(void *ignore,
- struct request_queue *q, struct request *rq)
+static void blk_add_trace_rq_insert(void *ignore, struct request *rq)
{
blk_add_trace_rq(rq, 0, blk_rq_bytes(rq), BLK_TA_INSERT,
- blk_trace_request_get_cgid(q, rq));
+ blk_trace_request_get_cgid(rq));
}
-static void blk_add_trace_rq_issue(void *ignore,
- struct request_queue *q, struct request *rq)
+static void blk_add_trace_rq_issue(void *ignore, struct request *rq)
{
blk_add_trace_rq(rq, 0, blk_rq_bytes(rq), BLK_TA_ISSUE,
- blk_trace_request_get_cgid(q, rq));
+ blk_trace_request_get_cgid(rq));
}
-static void blk_add_trace_rq_merge(void *ignore,
- struct request_queue *q, struct request *rq)
+static void blk_add_trace_rq_merge(void *ignore, struct request *rq)
{
blk_add_trace_rq(rq, 0, blk_rq_bytes(rq), BLK_TA_BACKMERGE,
- blk_trace_request_get_cgid(q, rq));
+ blk_trace_request_get_cgid(rq));
}
-static void blk_add_trace_rq_requeue(void *ignore,
- struct request_queue *q,
- struct request *rq)
+static void blk_add_trace_rq_requeue(void *ignore, struct request *rq)
{
blk_add_trace_rq(rq, 0, blk_rq_bytes(rq), BLK_TA_REQUEUE,
- blk_trace_request_get_cgid(q, rq));
+ blk_trace_request_get_cgid(rq));
}
static void blk_add_trace_rq_complete(void *ignore, struct request *rq,
int error, unsigned int nr_bytes)
{
blk_add_trace_rq(rq, error, nr_bytes, BLK_TA_COMPLETE,
- blk_trace_request_get_cgid(rq->q, rq));
+ blk_trace_request_get_cgid(rq));
}
/**
@@ -1037,16 +1032,14 @@ static void blk_add_trace_bio_remap(void *ignore, struct bio *bio, dev_t dev,
* Add a trace for that action.
*
**/
-static void blk_add_trace_rq_remap(void *ignore,
- struct request_queue *q,
- struct request *rq, dev_t dev,
+static void blk_add_trace_rq_remap(void *ignore, struct request *rq, dev_t dev,
sector_t from)
{
struct blk_trace *bt;
struct blk_io_trace_remap r;
rcu_read_lock();
- bt = rcu_dereference(q->blk_trace);
+ bt = rcu_dereference(rq->q->blk_trace);
if (likely(!bt)) {
rcu_read_unlock();
return;
@@ -1058,13 +1051,12 @@ static void blk_add_trace_rq_remap(void *ignore,
__blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq),
rq_data_dir(rq), 0, BLK_TA_REMAP, 0,
- sizeof(r), &r, blk_trace_request_get_cgid(q, rq));
+ sizeof(r), &r, blk_trace_request_get_cgid(rq));
rcu_read_unlock();
}
/**
* blk_add_driver_data - Add binary message with driver-specific data
- * @q: queue the io is for
* @rq: io request
* @data: driver-specific data
* @len: length of driver-specific data
@@ -1073,14 +1065,12 @@ static void blk_add_trace_rq_remap(void *ignore,
* Some drivers might want to write driver-specific data per request.
*
**/
-void blk_add_driver_data(struct request_queue *q,
- struct request *rq,
- void *data, size_t len)
+void blk_add_driver_data(struct request *rq, void *data, size_t len)
{
struct blk_trace *bt;
rcu_read_lock();
- bt = rcu_dereference(q->blk_trace);
+ bt = rcu_dereference(rq->q->blk_trace);
if (likely(!bt)) {
rcu_read_unlock();
return;
@@ -1088,7 +1078,7 @@ void blk_add_driver_data(struct request_queue *q,
__blk_add_trace(bt, blk_rq_trace_sector(rq), blk_rq_bytes(rq), 0, 0,
BLK_TA_DRV_DATA, 0, len, data,
- blk_trace_request_get_cgid(q, rq));
+ blk_trace_request_get_cgid(rq));
rcu_read_unlock();
}
EXPORT_SYMBOL_GPL(blk_add_driver_data);
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] block: remove the unused block_sleeprq tracepoint
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
@ 2020-12-03 19:45 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Tejun Heo @ 2020-12-03 19:45 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On Thu, Dec 03, 2020 at 05:21:35PM +0100, Christoph Hellwig wrote:
> The block_sleeprq tracepoint was only used by the legacy request code.
> Remove it now that the legacy request code is gone.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class
2020-12-03 16:21 ` [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class Christoph Hellwig
@ 2020-12-03 20:05 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Tejun Heo @ 2020-12-03 20:05 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On Thu, Dec 03, 2020 at 05:21:36PM +0100, Christoph Hellwig wrote:
> The block_bio_merge tracepoint class can be reused for most bio-based
> tracepoints. For that it just needs to lose the superfluous q and rq
> parameters.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
@ 2020-12-03 20:06 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Tejun Heo @ 2020-12-03 20:06 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On Thu, Dec 03, 2020 at 05:21:37PM +0100, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
--
tejun
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint
2020-12-03 16:21 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig
@ 2020-12-03 20:07 ` Tejun Heo
2020-12-04 3:27 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Tejun Heo @ 2020-12-03 20:07 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On Thu, Dec 03, 2020 at 05:21:38PM +0100, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
--
tejun
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] block: remove the request_queue to argument request based tracepoints
2020-12-03 16:21 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig
@ 2020-12-03 20:10 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Tejun Heo @ 2020-12-03 20:10 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On Thu, Dec 03, 2020 at 05:21:39PM +0100, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the request.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] block: remove the unused block_sleeprq tracepoint
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
2020-12-03 19:45 ` Tejun Heo
@ 2020-12-04 3:25 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-04 3:25 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On 12/3/20 08:24, Christoph Hellwig wrote:
> The block_sleeprq tracepoint was only used by the legacy request code.
> Remove it now that the legacy request code is gone.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class
2020-12-03 16:21 ` [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class Christoph Hellwig
2020-12-03 20:05 ` Tejun Heo
@ 2020-12-04 3:25 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-04 3:25 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On 12/3/20 08:26, Christoph Hellwig wrote:
> The block_bio_merge tracepoint class can be reused for most bio-based
> tracepoints. For that it just needs to lose the superfluous q and rq
> parameters.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
2020-12-03 20:06 ` Tejun Heo
@ 2020-12-04 3:26 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-04 3:26 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On 12/3/20 08:26, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] block: remove the request_queue to argument request based tracepoints
2020-12-03 16:21 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig
2020-12-03 20:10 ` Tejun Heo
@ 2020-12-04 3:26 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-04 3:26 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On 12/3/20 08:26, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the request.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint
2020-12-03 16:21 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig
2020-12-03 20:07 ` Tejun Heo
@ 2020-12-04 3:27 ` Chaitanya Kulkarni
1 sibling, 0 replies; 20+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-04 3:27 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390,
Damien Le Moal, Hannes Reinecke
On 12/3/20 08:26, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: block tracepoint cleanups v2
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
` (4 preceding siblings ...)
2020-12-03 16:21 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig
@ 2020-12-04 16:42 ` Jens Axboe
5 siblings, 0 replies; 20+ messages in thread
From: Jens Axboe @ 2020-12-04 16:42 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Tejun Heo, dm-devel, linux-block, linux-raid, linux-s390
On 12/3/20 9:21 AM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series cleans up the block layer tracepoints by removing unused
> tracepoints or tracepoint arguments and consolidating the implementation
> of various bio based tracepoints.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-11-30 17:58 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
2020-12-03 8:59 ` Damien Le Moal
@ 2020-12-03 12:47 ` Hannes Reinecke
1 sibling, 0 replies; 20+ messages in thread
From: Hannes Reinecke @ 2020-12-03 12:47 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: dm-devel, linux-block, linux-raid, linux-s390
On 11/30/20 6:58 PM, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-merge.c | 2 +-
> drivers/md/dm.c | 2 +-
> include/trace/events/block.h | 14 ++++++--------
> kernel/trace/blktrace.c | 5 ++---
> 4 files changed, 10 insertions(+), 13 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-11-30 17:58 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
@ 2020-12-03 8:59 ` Damien Le Moal
2020-12-03 12:47 ` Hannes Reinecke
1 sibling, 0 replies; 20+ messages in thread
From: Damien Le Moal @ 2020-12-03 8:59 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe
Cc: dm-devel, linux-block, linux-raid, linux-s390
On 2020/12/01 3:09, Christoph Hellwig wrote:
> The request_queue can trivially be derived from the bio.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-merge.c | 2 +-
> drivers/md/dm.c | 2 +-
> include/trace/events/block.h | 14 ++++++--------
> kernel/trace/blktrace.c | 5 ++---
> 4 files changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/block/blk-merge.c b/block/blk-merge.c
> index 1a46d5bbd399e3..4071daa88a5eaf 100644
> --- a/block/blk-merge.c
> +++ b/block/blk-merge.c
> @@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
> split->bi_opf |= REQ_NOMERGE;
>
> bio_chain(split, *bio);
> - trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
> + trace_block_split(split, (*bio)->bi_iter.bi_sector);
> submit_bio_noacct(*bio);
> *bio = split;
> }
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index ed7e836efbcdbc..9a5bd90779c7c4 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
> part_stat_unlock();
>
> bio_chain(b, bio);
> - trace_block_split(md->queue, b, bio->bi_iter.bi_sector);
> + trace_block_split(b, bio->bi_iter.bi_sector);
> ret = submit_bio_noacct(bio);
> break;
> }
> diff --git a/include/trace/events/block.h b/include/trace/events/block.h
> index 506c29dc7c76fd..b415e4cba84304 100644
> --- a/include/trace/events/block.h
> +++ b/include/trace/events/block.h
> @@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug,
>
> /**
> * block_split - split a single bio struct into two bio structs
> - * @q: queue containing the bio
> * @bio: block operation being split
> * @new_sector: The starting sector for the new bio
> *
> - * The bio request @bio in request queue @q needs to be split into two
> - * bio requests. The newly created @bio request starts at
> - * @new_sector. This split may be required due to hardware limitation
> - * such as operation crossing device boundaries in a RAID system.
> + * The bio request @bio needs to be split into two bio requests. The newly
> + * created @bio request starts at @new_sector. This split may be required due to
> + * hardware limitations such as operation crossing device boundaries in a RAID
> + * system.
> */
> TRACE_EVENT(block_split,
>
> - TP_PROTO(struct request_queue *q, struct bio *bio,
> - unsigned int new_sector),
> + TP_PROTO(struct bio *bio, unsigned int new_sector),
>
> - TP_ARGS(q, bio, new_sector),
> + TP_ARGS(bio, new_sector),
>
> TP_STRUCT__entry(
> __field( dev_t, dev )
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index 7ab88e00c15765..3ca6d62114f461 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
> rcu_read_unlock();
> }
>
> -static void blk_add_trace_split(void *ignore,
> - struct request_queue *q, struct bio *bio,
> - unsigned int pdu)
> +static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
> {
> + struct request_queue *q = bio->bi_disk->queue;
> struct blk_trace *bt;
>
> rcu_read_lock();
>
Looks good.
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint
2020-11-30 17:58 block tracepoint cleanups Christoph Hellwig
@ 2020-11-30 17:58 ` Christoph Hellwig
2020-12-03 8:59 ` Damien Le Moal
2020-12-03 12:47 ` Hannes Reinecke
0 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2020-11-30 17:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: dm-devel, linux-block, linux-raid, linux-s390
The request_queue can trivially be derived from the bio.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-merge.c | 2 +-
drivers/md/dm.c | 2 +-
include/trace/events/block.h | 14 ++++++--------
kernel/trace/blktrace.c | 5 ++---
4 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 1a46d5bbd399e3..4071daa88a5eaf 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs)
split->bi_opf |= REQ_NOMERGE;
bio_chain(split, *bio);
- trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
+ trace_block_split(split, (*bio)->bi_iter.bi_sector);
submit_bio_noacct(*bio);
*bio = split;
}
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index ed7e836efbcdbc..9a5bd90779c7c4 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1612,7 +1612,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
part_stat_unlock();
bio_chain(b, bio);
- trace_block_split(md->queue, b, bio->bi_iter.bi_sector);
+ trace_block_split(b, bio->bi_iter.bi_sector);
ret = submit_bio_noacct(bio);
break;
}
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 506c29dc7c76fd..b415e4cba84304 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -411,21 +411,19 @@ DEFINE_EVENT(block_unplug, block_unplug,
/**
* block_split - split a single bio struct into two bio structs
- * @q: queue containing the bio
* @bio: block operation being split
* @new_sector: The starting sector for the new bio
*
- * The bio request @bio in request queue @q needs to be split into two
- * bio requests. The newly created @bio request starts at
- * @new_sector. This split may be required due to hardware limitation
- * such as operation crossing device boundaries in a RAID system.
+ * The bio request @bio needs to be split into two bio requests. The newly
+ * created @bio request starts at @new_sector. This split may be required due to
+ * hardware limitations such as operation crossing device boundaries in a RAID
+ * system.
*/
TRACE_EVENT(block_split,
- TP_PROTO(struct request_queue *q, struct bio *bio,
- unsigned int new_sector),
+ TP_PROTO(struct bio *bio, unsigned int new_sector),
- TP_ARGS(q, bio, new_sector),
+ TP_ARGS(bio, new_sector),
TP_STRUCT__entry(
__field( dev_t, dev )
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 7ab88e00c15765..3ca6d62114f461 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -970,10 +970,9 @@ static void blk_add_trace_unplug(void *ignore, struct request_queue *q,
rcu_read_unlock();
}
-static void blk_add_trace_split(void *ignore,
- struct request_queue *q, struct bio *bio,
- unsigned int pdu)
+static void blk_add_trace_split(void *ignore, struct bio *bio, unsigned int pdu)
{
+ struct request_queue *q = bio->bi_disk->queue;
struct blk_trace *bt;
rcu_read_lock();
--
2.29.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2020-12-04 16:43 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 16:21 block tracepoint cleanups v2 Christoph Hellwig
2020-12-03 16:21 ` [PATCH 1/5] block: remove the unused block_sleeprq tracepoint Christoph Hellwig
2020-12-03 19:45 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 2/5] block: simplify and extend the block_bio_merge tracepoint class Christoph Hellwig
2020-12-03 20:05 ` Tejun Heo
2020-12-04 3:25 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
2020-12-03 20:06 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 4/5] block: remove the request_queue argument to the block_bio_remap tracepoint Christoph Hellwig
2020-12-03 20:07 ` Tejun Heo
2020-12-04 3:27 ` Chaitanya Kulkarni
2020-12-03 16:21 ` [PATCH 5/5] block: remove the request_queue to argument request based tracepoints Christoph Hellwig
2020-12-03 20:10 ` Tejun Heo
2020-12-04 3:26 ` Chaitanya Kulkarni
2020-12-04 16:42 ` block tracepoint cleanups v2 Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2020-11-30 17:58 block tracepoint cleanups Christoph Hellwig
2020-11-30 17:58 ` [PATCH 3/5] block: remove the request_queue argument to the block_split tracepoint Christoph Hellwig
2020-12-03 8:59 ` Damien Le Moal
2020-12-03 12:47 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).