Skip to content

Commit

Permalink
block: get rid of the trace rq insert wrapper
Browse files Browse the repository at this point in the history
Get rid of the wrapper for trace_block_rq_insert() and call the function
directly.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Chaitanya Kulkarni authored and Jens Axboe committed Feb 22, 2021
1 parent b071924 commit b357e4a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion block/bfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
#include <linux/delay.h>
#include <linux/backing-dev.h>

#include <trace/events/block.h>

#include "blk.h"
#include "blk-mq.h"
#include "blk-mq-tag.h"
Expand Down Expand Up @@ -5621,7 +5623,7 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,

spin_unlock_irq(&bfqd->lock);

blk_mq_sched_request_inserted(rq);
trace_block_rq_insert(rq);

spin_lock_irq(&bfqd->lock);
bfqq = bfq_init_rq(rq);
Expand Down
1 change: 1 addition & 0 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap);
EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete);
EXPORT_TRACEPOINT_SYMBOL_GPL(block_split);
EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug);
EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_insert);

DEFINE_IDA(blk_queue_ida);

Expand Down
6 changes: 0 additions & 6 deletions block/blk-mq-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,6 @@ bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq)
}
EXPORT_SYMBOL_GPL(blk_mq_sched_try_insert_merge);

void blk_mq_sched_request_inserted(struct request *rq)
{
trace_block_rq_insert(rq);
}
EXPORT_SYMBOL_GPL(blk_mq_sched_request_inserted);

static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
bool has_sched,
struct request *rq)
Expand Down
1 change: 0 additions & 1 deletion block/blk-mq-sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

void blk_mq_sched_assign_ioc(struct request *rq);

void blk_mq_sched_request_inserted(struct request *rq);
bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio,
unsigned int nr_segs, struct request **merged_request);
bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
Expand Down
4 changes: 3 additions & 1 deletion block/kyber-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <linux/module.h>
#include <linux/sbitmap.h>

#include <trace/events/block.h>

#include "blk.h"
#include "blk-mq.h"
#include "blk-mq-debugfs.h"
Expand Down Expand Up @@ -602,7 +604,7 @@ static void kyber_insert_requests(struct blk_mq_hw_ctx *hctx,
list_move_tail(&rq->queuelist, head);
sbitmap_set_bit(&khd->kcq_map[sched_domain],
rq->mq_ctx->index_hw[hctx->type]);
blk_mq_sched_request_inserted(rq);
trace_block_rq_insert(rq);
spin_unlock(&kcq->lock);
}
}
Expand Down
4 changes: 3 additions & 1 deletion block/mq-deadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <linux/rbtree.h>
#include <linux/sbitmap.h>

#include <trace/events/block.h>

#include "blk.h"
#include "blk-mq.h"
#include "blk-mq-debugfs.h"
Expand Down Expand Up @@ -496,7 +498,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
if (blk_mq_sched_try_insert_merge(q, rq))
return;

blk_mq_sched_request_inserted(rq);
trace_block_rq_insert(rq);

if (at_head || blk_rq_is_passthrough(rq)) {
if (at_head)
Expand Down

0 comments on commit b357e4a

Please sign in to comment.