Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 10
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 553.79.1
RHEL_RELEASE = 553.80.1

#
# ZSTREAM
Expand Down
139 changes: 0 additions & 139 deletions block/blk-mq-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,87 +540,6 @@ static int hctx_sched_tags_bitmap_show(void *data, struct seq_file *m)
return res;
}

static int hctx_io_poll_show(void *data, struct seq_file *m)
{
struct blk_mq_hw_ctx *hctx = data;

seq_printf(m, "considered=%lu\n", hctx->poll_considered);
seq_printf(m, "invoked=%lu\n", hctx->poll_invoked);
seq_printf(m, "success=%lu\n", hctx->poll_success);
return 0;
}

static ssize_t hctx_io_poll_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_hw_ctx *hctx = data;

hctx->poll_considered = hctx->poll_invoked = hctx->poll_success = 0;
return count;
}

static int hctx_dispatched_show(void *data, struct seq_file *m)
{
struct blk_mq_hw_ctx *hctx = data;
int i;

seq_printf(m, "%8u\t%lu\n", 0U, hctx->dispatched[0]);

for (i = 1; i < BLK_MQ_MAX_DISPATCH_ORDER - 1; i++) {
unsigned int d = 1U << (i - 1);

seq_printf(m, "%8u\t%lu\n", d, hctx->dispatched[i]);
}

seq_printf(m, "%8u+\t%lu\n", 1U << (i - 1), hctx->dispatched[i]);
return 0;
}

static ssize_t hctx_dispatched_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_hw_ctx *hctx = data;
int i;

for (i = 0; i < BLK_MQ_MAX_DISPATCH_ORDER; i++)
hctx->dispatched[i] = 0;
return count;
}

static int hctx_queued_show(void *data, struct seq_file *m)
{
struct blk_mq_hw_ctx *hctx = data;

seq_printf(m, "%lu\n", hctx->queued);
return 0;
}

static ssize_t hctx_queued_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_hw_ctx *hctx = data;

hctx->queued = 0;
return count;
}

static int hctx_run_show(void *data, struct seq_file *m)
{
struct blk_mq_hw_ctx *hctx = data;

seq_printf(m, "%lu\n", hctx->run);
return 0;
}

static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count,
loff_t *ppos)
{
struct blk_mq_hw_ctx *hctx = data;

hctx->run = 0;
return count;
}

static int hctx_active_show(void *data, struct seq_file *m)
{
struct blk_mq_hw_ctx *hctx = data;
Expand Down Expand Up @@ -674,57 +593,6 @@ CTX_RQ_SEQ_OPS(default, HCTX_TYPE_DEFAULT);
CTX_RQ_SEQ_OPS(read, HCTX_TYPE_READ);
CTX_RQ_SEQ_OPS(poll, HCTX_TYPE_POLL);

static int ctx_dispatched_show(void *data, struct seq_file *m)
{
struct blk_mq_ctx *ctx = data;

seq_printf(m, "%lu %lu\n", ctx->rq_dispatched[1], ctx->rq_dispatched[0]);
return 0;
}

static ssize_t ctx_dispatched_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_ctx *ctx = data;

ctx->rq_dispatched[0] = ctx->rq_dispatched[1] = 0;
return count;
}

static int ctx_merged_show(void *data, struct seq_file *m)
{
struct blk_mq_ctx *ctx = data;

seq_printf(m, "%lu\n", ctx->rq_merged);
return 0;
}

static ssize_t ctx_merged_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_ctx *ctx = data;

ctx->rq_merged = 0;
return count;
}

static int ctx_completed_show(void *data, struct seq_file *m)
{
struct blk_mq_ctx *ctx = data;

seq_printf(m, "%lu %lu\n", ctx->rq_completed[1], ctx->rq_completed[0]);
return 0;
}

static ssize_t ctx_completed_write(void *data, const char __user *buf,
size_t count, loff_t *ppos)
{
struct blk_mq_ctx *ctx = data;

ctx->rq_completed[0] = ctx->rq_completed[1] = 0;
return count;
}

static int blk_mq_debugfs_show(struct seq_file *m, void *v)
{
const struct blk_mq_debugfs_attr *attr = m->private;
Expand Down Expand Up @@ -800,10 +668,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = {
{"tags_bitmap", 0400, hctx_tags_bitmap_show},
{"sched_tags", 0400, hctx_sched_tags_show},
{"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show},
{"io_poll", 0600, hctx_io_poll_show, hctx_io_poll_write},
{"dispatched", 0600, hctx_dispatched_show, hctx_dispatched_write},
{"queued", 0600, hctx_queued_show, hctx_queued_write},
{"run", 0600, hctx_run_show, hctx_run_write},
{"active", 0400, hctx_active_show},
{"dispatch_busy", 0400, hctx_dispatch_busy_show},
{"type", 0400, hctx_type_show},
Expand All @@ -814,9 +678,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_ctx_attrs[] = {
{"default_rq_list", 0400, .seq_ops = &ctx_default_rq_list_seq_ops},
{"read_rq_list", 0400, .seq_ops = &ctx_read_rq_list_seq_ops},
{"poll_rq_list", 0400, .seq_ops = &ctx_poll_rq_list_seq_ops},
{"dispatched", 0600, ctx_dispatched_show, ctx_dispatched_write},
{"merged", 0600, ctx_merged_show, ctx_merged_write},
{"completed", 0600, ctx_completed_show, ctx_completed_write},
{},
};

Expand Down
6 changes: 1 addition & 5 deletions block/blk-mq-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)))
return;

hctx->run++;

/*
* A return of -EAGAIN is an indication that hctx->dispatch is not
* empty and we must run again in order to avoid starving flushes.
Expand Down Expand Up @@ -415,10 +413,8 @@ static bool blk_mq_attempt_merge(struct request_queue *q,

lockdep_assert_held(&ctx->lock);

if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio)) {
ctx->rq_merged++;
if (blk_bio_list_merge(q, &ctx->rq_lists[type], bio))
return true;
}

return false;
}
Expand Down
19 changes: 0 additions & 19 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
rq->end_io = NULL;
rq->end_io_data = NULL;

data->ctx->rq_dispatched[op_is_sync(data->cmd_flags)]++;
refcount_set(&rq->ref, 1);

if (!op_is_flush(data->cmd_flags)) {
Expand All @@ -369,7 +368,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
}
}

data->hctx->queued++;
return rq;
}

Expand Down Expand Up @@ -537,7 +535,6 @@ void blk_mq_free_request(struct request *rq)
{
struct request_queue *q = rq->q;
struct elevator_queue *e = q->elevator;
struct blk_mq_ctx *ctx = rq->mq_ctx;
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;

if (rq->rq_flags & RQF_ELVPRIV) {
Expand All @@ -549,7 +546,6 @@ void blk_mq_free_request(struct request *rq)
}
}

ctx->rq_completed[rq_is_sync(rq)]++;
if (rq->rq_flags & RQF_MQ_INFLIGHT)
__blk_mq_dec_active_requests(hctx);

Expand Down Expand Up @@ -1164,14 +1160,6 @@ struct request *blk_mq_dequeue_from_ctx(struct blk_mq_hw_ctx *hctx,
return data.rq;
}

static inline unsigned int queued_to_index(unsigned int queued)
{
if (!queued)
return 0;

return min(BLK_MQ_MAX_DISPATCH_ORDER - 1, ilog2(queued) + 1);
}

static bool __blk_mq_get_driver_tag(struct request *rq)
{
struct sbitmap_queue *bt = rq->mq_hctx->tags->bitmap_tags;
Expand Down Expand Up @@ -1515,8 +1503,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
if (!list_empty(&zone_list))
list_splice_tail_init(&zone_list, list);

hctx->dispatched[queued_to_index(queued)]++;

/* If we didn't flush the entire list, we could have told the driver
* there was more coming, but that turned out to be a lie.
*/
Expand Down Expand Up @@ -4112,17 +4098,12 @@ int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
if (spin && blk_mq_poll_hybrid(q, hctx, cookie))
return 1;

hctx->poll_considered++;

state = get_current_state();
do {
int ret;

hctx->poll_invoked++;

ret = q->mq_ops->poll(hctx);
if (ret > 0) {
hctx->poll_success++;
__set_current_state(TASK_RUNNING);
return ret;
}
Expand Down
6 changes: 3 additions & 3 deletions block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ struct blk_mq_ctx {
RH_KABI_BROKEN_INSERT(struct blk_mq_hw_ctx *hctxs[HCTX_MAX_TYPES])

/* incremented at dispatch time */
unsigned long rq_dispatched[2];
unsigned long rq_merged;
RH_KABI_DEPRECATE(unsigned long, rq_dispatched[2])
RH_KABI_DEPRECATE(unsigned long, rq_merged)

/* incremented at completion time */
unsigned long ____cacheline_aligned_in_smp rq_completed[2];
RH_KABI_DEPRECATE(unsigned long ____cacheline_aligned_in_smp, rq_completed[2])

struct request_queue *queue;
struct blk_mq_ctxs *ctxs;
Expand Down
Loading