All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Paolo Valente <paolo.valente@linaro.org>, Jens Axboe <axboe@kernel.dk>
Cc: Oleksandr Natalenko <oleksandr@natalenko.name>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook
Date: Fri, 16 Feb 2018 06:39:16 +0100	[thread overview]
Message-ID: <1518759556.17014.63.camel@gmx.de> (raw)
In-Reply-To: <C9E94FF0-4C0F-47A6-86A9-EDE049D32368@linaro.org>

On Thu, 2018-02-15 at 19:13 +0100, Paolo Valente wrote:
> 
> > Il giorno 14 feb 2018, alle ore 16:44, Jens Axboe <axboe@kernel.dk> ha scritto:
> > 
> > On 2/14/18 8:39 AM, Paolo Valente wrote:
> >> 
> >> 
> >>> Il giorno 14 feb 2018, alle ore 16:19, Jens Axboe <axboe@kernel.dk> ha scritto:
> >>> 
> >>> On 2/14/18 1:56 AM, Paolo Valente wrote:
> >>>> 
> >>>> 
> >>>>> Il giorno 14 feb 2018, alle ore 08:15, Mike Galbraith <efault@gmx.de> ha scritto:
> >>>>> 
> >>>>> On Wed, 2018-02-14 at 08:04 +0100, Mike Galbraith wrote:
> >>>>>> 
> >>>>>> And _of course_, roughly two minutes later, IO stalled.
> >>>>> 
> >>>>> P.S.
> >>>>> 
> >>>>> crash> bt 19117
> >>>>> PID: 19117  TASK: ffff8803d2dcd280  CPU: 7   COMMAND: "kworker/7:2"
> >>>>> #0 [ffff8803f7207bb8] __schedule at ffffffff81595e18
> >>>>> #1 [ffff8803f7207c40] schedule at ffffffff81596422
> >>>>> #2 [ffff8803f7207c50] io_schedule at ffffffff8108a832
> >>>>> #3 [ffff8803f7207c60] blk_mq_get_tag at ffffffff8129cd1e
> >>>>> #4 [ffff8803f7207cc0] blk_mq_get_request at ffffffff812987cc
> >>>>> #5 [ffff8803f7207d00] blk_mq_alloc_request at ffffffff81298a9a
> >>>>> #6 [ffff8803f7207d38] blk_get_request_flags at ffffffff8128e674
> >>>>> #7 [ffff8803f7207d60] scsi_execute at ffffffffa0025b58 [scsi_mod]
> >>>>> #8 [ffff8803f7207d98] scsi_test_unit_ready at ffffffffa002611c [scsi_mod]
> >>>>> #9 [ffff8803f7207df8] sd_check_events at ffffffffa0212747 [sd_mod]
> >>>>> #10 [ffff8803f7207e20] disk_check_events at ffffffff812a0f85
> >>>>> #11 [ffff8803f7207e78] process_one_work at ffffffff81079867
> >>>>> #12 [ffff8803f7207eb8] worker_thread at ffffffff8107a127
> >>>>> #13 [ffff8803f7207f10] kthread at ffffffff8107ef48
> >>>>> #14 [ffff8803f7207f50] ret_from_fork at ffffffff816001a5
> >>>>> crash>
> >>>> 
> >>>> This has evidently to do with tag pressure.  I've looked for a way to
> >>>> easily reduce the number of tags online, so as to put your system in
> >>>> the bad spot deterministically.  But at no avail.  Does anyone know a
> >>>> way to do it?
> >>> 
> >>> The key here might be that it's not a regular file system request,
> >>> which I'm sure bfq probably handles differently. So it's possible
> >>> that you are slowly leaking those tags, and we end up in this
> >>> miserable situation after a while.
> >>> 
> >> 
> >> Could you elaborate more on this?  My mental model of bfq hooks in
> >> this respect is that they do only side operations, which AFAIK cannot
> >> block the putting of a tag.  IOW, tag getting and putting is done
> >> outside bfq, regardless of what bfq does with I/O requests.  Is there
> >> a flaw in this?
> >> 
> >> In any case, is there any flag in or the like, in requests passed to
> >> bfq, that I could make bfq check, to raise some warning?
> > 
> > I'm completely guessing, and I don't know if this trace is always what
> > Mike sees when things hang. It just seems suspect that we end up with a
> > "special" request here, since I'm sure the regular file system requests
> > outnumber them greatly. That raises my suspicion that the type is
> > related.
> > 
> > But no, there should be no special handling on the freeing side, my
> > guess was that BFQ ends them a bit differently.
> > 
> 
> Hi Jens,
> whatever the exact cause of leakage is, a leakage in its turn does
> sound like a reasonable cause for these hangs.  But also if leakage is
> the cause, it seems to me that reducing tags to just 1 might help
> trigger the problem quickly and reliably on Mike's machine.  If you
> agree, Jens, which would be the quickest/easiest way to reduce tags?

Whatever the cause, seems this wants some instrumentation that can be
left in place for a while. ᅵI turned onᅵCONFIG_BLK_DEBUG_FS for Jens,
but the little bugger didn't raise it's ugly head all day long.

What you need most is more reproducers. ᅵMy box swears there's
something amiss, and that something is BFQ.. but it's alone.

	-Mike

  reply	other threads:[~2018-02-16  5:39 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 21:19 [PATCH BUGFIX V3] block, bfq: add requeue-request hook Paolo Valente
2018-02-07 22:18 ` Jens Axboe
2018-02-08  7:16   ` Paolo Valente
2018-02-08  7:16     ` Paolo Valente
2018-02-09 13:21     ` Oleksandr Natalenko
2018-02-09 17:17       ` Jens Axboe
2018-02-09 17:29       ` Mike Galbraith
2018-02-10  8:29         ` Oleksandr Natalenko
2018-02-10  8:29           ` Oleksandr Natalenko
2018-02-12  7:24           ` Paolo Valente
2018-02-12  7:24             ` Paolo Valente
2018-02-12 11:22             ` Mike Galbraith
2018-02-12 12:48               ` Oleksandr Natalenko
2018-02-13  5:02                 ` Mike Galbraith
2018-02-13  5:46                   ` Paolo Valente
2018-02-13  6:42                     ` Mike Galbraith
2018-02-13  6:50                       ` Mike Galbraith
2018-02-13  8:15                         ` Paolo Valente
2018-02-13 14:30                           ` Mike Galbraith
2018-02-14  5:58                             ` Mike Galbraith
2018-02-14  7:04                               ` Mike Galbraith
2018-02-14  7:15                                 ` Mike Galbraith
2018-02-14  8:56                                   ` Paolo Valente
2018-02-14  9:55                                     ` Oleksandr Natalenko
2018-02-14 13:25                                       ` Mike Galbraith
2018-02-14 15:19                                     ` Jens Axboe
2018-02-14 15:39                                       ` Paolo Valente
2018-02-14 15:44                                         ` Jens Axboe
2018-02-15 18:13                                           ` Paolo Valente
2018-02-16  5:39                                             ` Mike Galbraith [this message]
2018-02-16  7:16                                               ` Paolo Valente
2018-02-16  7:20                                               ` Paolo Valente
2018-02-17  5:30                                           ` Mike Galbraith
2018-02-17  5:33                                             ` Mike Galbraith
2018-02-19  5:34                                               ` Mike Galbraith
2018-02-19  6:05                                                 ` Oleksandr Natalenko
2018-02-19  7:09                                                   ` Mike Galbraith
2018-02-19  7:58                                                     ` Mike Galbraith
2018-02-19  9:37                                                 ` Paolo Valente
2018-02-19 13:18                                                   ` Mike Galbraith
2018-02-17  5:39                                             ` Mike Galbraith
2018-02-26 19:48                 ` Greg KH
2018-02-26 20:10                   ` Oleksandr Natalenko
2018-02-26 20:18                     ` Jens Axboe
2018-02-23 15:07 ` Ming Lei
2018-02-23 15:41   ` Paolo Valente
2018-02-23 15:41     ` Paolo Valente
2018-02-23 16:17     ` Ming Lei
2018-02-24  7:54       ` Paolo Valente
2018-02-24  7:54         ` Paolo Valente
2018-02-24 12:05         ` Ming Lei
2018-02-24 16:15           ` Paolo Valente
2018-02-24 16:15             ` Paolo Valente

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=1518759556.17014.63.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=axboe@kernel.dk \
    --cc=oleksandr@natalenko.name \
    --cc=paolo.valente@linaro.org \
    --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 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.