public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Ming Lei <ming.lei@redhat.com>, Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@vger.kernel.org,
	cgroups@vger.kernel.org, newella@fb.com, josef@toxicpanda.com
Subject: Re: [PATCH 2/5] block: add request->io_data_len
Date: Thu, 9 Apr 2020 08:08:59 +0300	[thread overview]
Message-ID: <c2b362f5-36f6-116d-ddb5-2445d13d2bac@gmail.com> (raw)
In-Reply-To: <20200409023857.GB370295@localhost.localdomain>

On 09/04/2020 05:38, Ming Lei wrote:
> On Wed, Apr 08, 2020 at 10:11:19PM -0400, Tejun Heo wrote:
>> On Thu, Apr 09, 2020 at 09:44:06AM +0800, Ming Lei wrote:
>>> Almost all __blk_mq_end_request() follow blk_update_request(), so the
>>> completed bytes can be passed to __blk_mq_end_request(), then we can
>>> avoid to introduce this field.
>>
>> But on some drivers blk_update_request() may be called multiple times before
>> __blk_mq_end_request() is called and what's needed here is the total number of
>> bytes in the whole request, not just in the final completion.
> 
> OK.
> 
> Another choice might be to record request bytes in rq's payload
> when calling .queue_rq() only for these drivers.
> 
>>
>>> Also there is just 20 callers of __blk_mq_end_request(), looks this kind
>>> of change shouldn't be too big.
>>
>> This would work iff we get rid of partial completions and if we get rid of
>> partial completions, we might as well stop exposing blk_update_request() and
>> __blk_mq_end_request().
> 
> Indeed, we can store the completed bytes in request payload, so looks killing
> partial completion shouldn't be too hard.

struct request already has such field (see @stats_sectors) because of the same
root-cause. I'd prefer killing it as well by following Ming's way, but otherwise
it could be easily adopted.

-- 
Pavel Begunkov

  reply	other threads:[~2020-04-09  5:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 20:14 [PATCHSET block/for-5.8] iocost: improve use_delay and latency target handling Tejun Heo
2020-04-08 20:14 ` [PATCH 1/5] blk-iocost: switch to fixed non-auto-decaying use_delay Tejun Heo
2020-04-08 20:14 ` [PATCH 2/5] block: add request->io_data_len Tejun Heo
2020-04-09  1:44   ` Ming Lei
2020-04-09  2:11     ` Tejun Heo
2020-04-09  2:38       ` Ming Lei
2020-04-09  5:08         ` Pavel Begunkov [this message]
2020-04-13 14:02           ` Tejun Heo
2020-04-13 13:56         ` Tejun Heo
2020-04-09  3:44   ` Bart Van Assche
2020-04-13 13:52     ` Tejun Heo
2020-04-08 20:14 ` [PATCH 3/5] blk-iocost: account for IO size when testing latencies Tejun Heo
2020-04-08 20:14 ` [PATCH 4/5] iocost_monitor: exit successfully if interval is zero Tejun Heo
2020-04-08 20:14 ` [PATCH 5/5] iocost_monitor: drop string wrap around numbers when outputting json Tejun Heo

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=c2b362f5-36f6-116d-ddb5-2445d13d2bac@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=newella@fb.com \
    --cc=tj@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