From: Omar Sandoval <osandov@osandov.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@fb.com>,
Bart Van Assche <bvanassche@acm.org>,
Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] blk-mq: I/O and timer unplugs are inverted in blktrace
Date: Thu, 27 Sep 2018 12:09:28 -0700 [thread overview]
Message-ID: <20180927190928.GB29754@vader> (raw)
In-Reply-To: <20180926123550.16311-1-idryomov@gmail.com>
On Wed, Sep 26, 2018 at 02:35:50PM +0200, Ilya Dryomov wrote:
> trace_block_unplug() takes true for explicit unplugs and false for
> implicit unplugs. schedule() unplugs are implicit and should be
> reported as timer unplugs. While correct in the legacy code, this has
> been inverted in blk-mq since 4.11.
>
> Cc: stable@vger.kernel.org
> Fixes: bd166ef183c2 ("blk-mq-sched: add framework for MQ capable IO schedulers")
Reviewed-by: Omar Sandoval <osandov@fb.com>
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
> ---
> block/blk-mq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 85a1c1a59c72..e3c39ea8e17b 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1628,7 +1628,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
> BUG_ON(!rq->q);
> if (rq->mq_ctx != this_ctx) {
> if (this_ctx) {
> - trace_block_unplug(this_q, depth, from_schedule);
> + trace_block_unplug(this_q, depth, !from_schedule);
> blk_mq_sched_insert_requests(this_q, this_ctx,
> &ctx_list,
> from_schedule);
> @@ -1648,7 +1648,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
> * on 'ctx_list'. Do those.
> */
> if (this_ctx) {
> - trace_block_unplug(this_q, depth, from_schedule);
> + trace_block_unplug(this_q, depth, !from_schedule);
> blk_mq_sched_insert_requests(this_q, this_ctx, &ctx_list,
> from_schedule);
> }
> --
> 2.14.4
>
next prev parent reply other threads:[~2018-09-28 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 12:35 [PATCH] blk-mq: I/O and timer unplugs are inverted in blktrace Ilya Dryomov
2018-09-27 19:09 ` Omar Sandoval [this message]
2018-09-27 19:12 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180927190928.GB29754@vader \
--to=osandov@osandov.com \
--cc=axboe@fb.com \
--cc=bvanassche@acm.org \
--cc=idryomov@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.