From: Matt Fleming <mfleming@cloudflare.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Yu Kuai <yukuai1@huaweicloud.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team <kernel-team@cloudflare.com>,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: 10x I/O await times in 6.12
Date: Tue, 19 May 2026 14:31:08 +0100 [thread overview]
Message-ID: <agxkk_jWd-qbg4t8@matt-Precision-5490> (raw)
In-Reply-To: <aepfV6Gp2uKbHi2N@matt-Precision-5490>
On Thu, Apr 23, 2026 at 07:18:39PM +0100, Matt Fleming wrote:
> On Mon, Apr 21, 2025 at 08:21:13PM +0800, Yu Kuai wrote:
> > If nsecs - plug->cur_ktime is still milliseconds, can you check if
> > the following patch can fix your problem?
> >
> > Thanks,
> > Kuai
> >
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index ae8494d88897..37197502147e 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -1095,7 +1095,9 @@ static inline void blk_account_io_start(struct request
> > *req)
> > return;
> >
> > req->rq_flags |= RQF_IO_STAT;
> > - req->start_time_ns = blk_time_get_ns();
> > +
> > + if (!current->plug)
> > + req->start_time_ns = blk_time_get_ns();
> >
> > /*
> > * All non-passthrough requests are created from a bio with one
> > @@ -2874,6 +2876,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug,
> > bool from_schedule)
> > {
> > struct request *rq;
> > unsigned int depth;
> > + u64 now;
> >
> > /*
> > * We may have been called recursively midway through handling
> > @@ -2887,6 +2890,10 @@ void blk_mq_flush_plug_list(struct blk_plug *plug,
> > bool from_schedule)
> > depth = plug->rq_count;
> > plug->rq_count = 0;
> >
> > + now = ktime_get_ns();
> > + rq_list_for_each(&plug->mq_list, rq)
> > + rq->start_time_ns = now;
> > +
> > if (!plug->multiple_queues && !plug->has_elevator && !from_schedule)
> > {
> > struct request_queue *q;
> >
>
> It's April again, and this time we're moving to 6.18.
>
> The I/O accounting bug reported at the start of this thread is still an
> issue for us, and we've been carrying the above patch for 12 months.
Hey Jens, any feedback on this patch?
next prev parent reply other threads:[~2026-05-19 13:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 8:53 10x I/O await times in 6.12 Matt Fleming
2025-04-21 12:21 ` Yu Kuai
2025-04-23 10:51 ` Matt Fleming
2025-04-24 2:35 ` Yu Kuai
2025-05-01 9:52 ` Matt Fleming
2026-04-23 18:18 ` Matt Fleming
2026-05-19 13:31 ` Matt Fleming [this message]
2025-04-21 15:22 ` Keith Busch
2025-04-21 18:35 ` Matt Fleming
2025-04-21 18:53 ` Keith Busch
2025-04-21 19:10 ` Matt Fleming
2025-04-22 1:39 ` Yu Kuai
2025-04-22 1:28 ` Yu Kuai
2025-04-22 1:39 ` Keith Busch
2025-04-22 3:02 ` Yu Kuai
2025-04-22 10:45 ` Matt Fleming
2025-04-23 3:36 ` Yu Kuai
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=agxkk_jWd-qbg4t8@matt-Precision-5490 \
--to=mfleming@cloudflare.com \
--cc=axboe@kernel.dk \
--cc=kernel-team@cloudflare.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox