public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: "jianchao.wang" <jianchao.w.wang@oracle.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@fb.com>,
	kernel-team@fb.com
Subject: Re: [RFC PATCH 1/5] block: move call of scheduler's ->completed_request() hook
Date: Fri, 10 Aug 2018 16:31:26 -0700	[thread overview]
Message-ID: <20180810233126.GB9835@vader> (raw)
In-Reply-To: <97b406d3-ae02-9f27-6855-59e5b13d665b@oracle.com>

On Fri, Aug 10, 2018 at 10:59:37AM +0800, jianchao.wang wrote:
> Hi Omar
> 
> On 08/10/2018 04:26 AM, Omar Sandoval wrote:
> > @@ -524,6 +524,9 @@ inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
> >  		blk_stat_add(rq, now);
> >  	}
> >  
> > +	if (rq->internal_tag != -1)
> > +		blk_mq_sched_completed_request(rq, now);
> > +
> 
> Is it OK to move the io scheduler completed callback into __blk_mq_end_request ?

It's ok in the sense that only Kyber uses it.

> There is a relatively long distance between the __blk_mq_complete_request and __blk_mq_end_request,
> especially the driver's mq_ops.complete and the bio_endio.

That's a fair point. We could maybe consolidate all of the I/O time
measurements to __blk_mq_complete_request() and have a separate callback
for the total time measurement in __blk_mq_end_request(), but I'm not
sure it's worth adding another hook for that.

  reply	other threads:[~2018-08-11  2:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 20:26 [RFC PATCH 0/5] kyber: better heuristics Omar Sandoval
2018-08-09 20:26 ` [RFC PATCH 1/5] block: move call of scheduler's ->completed_request() hook Omar Sandoval
2018-08-10  2:59   ` jianchao.wang
2018-08-10 23:31     ` Omar Sandoval [this message]
2018-08-09 20:26 ` [RFC PATCH 2/5] block: export blk_stat_enable_accounting() Omar Sandoval
2018-08-09 20:26 ` [RFC PATCH 3/5] kyber: don't make domain token sbitmap larger than necessary Omar Sandoval
2018-08-09 20:26 ` [RFC PATCH 4/5] kyber: implement improved heuristics Omar Sandoval
2018-08-09 20:26 ` [RFC PATCH 5/5] kyber: add tracepoints Omar Sandoval

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=20180810233126.GB9835@vader \
    --to=osandov@osandov.com \
    --cc=axboe@fb.com \
    --cc=jianchao.w.wang@oracle.com \
    --cc=kernel-team@fb.com \
    --cc=linux-block@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox