stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "snitzer@redhat.com" <snitzer@redhat.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"osandov@fb.com" <osandov@fb.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"mpatocka@redhat.com" <mpatocka@redhat.com>
Subject: Re: 4.19 LTS high /proc/diskstats io_ticks
Date: Wed, 25 Mar 2020 11:22:26 +0000	[thread overview]
Message-ID: <8b876ed9753478764bf5ea74d00b3d54c381b9f2.camel@nokia.com> (raw)
In-Reply-To: <20200325100736.GA3083079@kroah.com>

On Wed, 2020-03-25 at 11:07 +0100, Greg KH wrote:
> On Wed, Mar 25, 2020 at 10:02:41AM +0000, Rantala, Tommi T. (Nokia -
> FI/Espoo) wrote:
> > 
> > Other people are apparently seeing this too with 4.19:
> > https://kudzia.eu/b/2019/09/iostat-x-1-reporting-100-utilization-of-nearly-idle-nvme-drives/
> > 
> > 
> > I also see this only in 4.19.y and bisected to this (based on the Fixes
> > tag, this should have been taken to 4.14 too...):
> > 
> > commit 6131837b1de66116459ef4413e26fdbc70d066dc
> > Author: Omar Sandoval <osandov@fb.com>
> > Date:   Thu Apr 26 00:21:58 2018 -0700
> > 
> >   blk-mq: count allocated but not started requests in iostats inflight
> > 
> >   In the legacy block case, we increment the counter right after we
> >   allocate the request, not when the driver handles it. In both the
> > legacy
> >   and blk-mq cases, part_inc_in_flight() is called from
> >   blk_account_io_start() right after we've allocated the request. blk-mq
> >   only considers requests started requests as inflight, but this is
> >   inconsistent with the legacy definition and the intention in the code.
> >   This removes the started condition and instead counts all allocated
> >   requests.
> > 
> >   Fixes: f299b7c7a9de ("blk-mq: provide internal in-flight variant")
> >   Signed-off-by: Omar Sandoval <osandov@fb.com>
> >   Signed-off-by: Jens Axboe <axboe@kernel.dk>
> > 
> > 
> > 
> > If I get it right, when the disk is idle, and some request is allocated,
> > part_round_stats() with this commit will now add all ticks between
> > previous I/O and current time (now - part->stamp) to io_ticks.
> > 
> > Before the commit, part_round_stats() would only update part->stamp when
> > called after request allocation.
> 
> So this is a "false" reporting?  there's really no load?

Correct.

> > Any thoughts how to best fix this in 4.19?
> > I see the io_ticks accounting has been reworked in 5.0, do we need to
> > backport those to 4.19, or any ill effects if this commit is reverted in
> > 4.19?
> 
> Do you see this issue in 5.4?  What's keeping you from moving to 5.4.y?

Yes it's fixed in 5.0 and later.
Fixing it in 4.19.x would benefit debian stable users too. :-)
BTW is the EOL for 4.19 still end of 2020?

> And if this isn't a real issue, is that a problem too?
> 
> As you can test this, if you have a set of patches backported that could
> resolve it, can you send them to us?

Based on quick looks it's solved by this, I'll need to check if it's enough
to fix it:

commit 5b18b5a737600fd20ba2045f320d5926ebbf341a
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Thu Dec 6 11:41:19 2018 -0500

    block: delete part_round_stats and switch to less precise counting




> 
> thanks,
> 
> greg k-h


  reply	other threads:[~2020-03-25 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 10:02 4.19 LTS high /proc/diskstats io_ticks Rantala, Tommi T. (Nokia - FI/Espoo)
2020-03-25 10:07 ` Greg KH
2020-03-25 11:22   ` Rantala, Tommi T. (Nokia - FI/Espoo) [this message]
2020-03-25 15:24     ` 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=8b876ed9753478764bf5ea74d00b3d54c381b9f2.camel@nokia.com \
    --to=tommi.t.rantala@nokia.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=osandov@fb.com \
    --cc=snitzer@redhat.com \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).