From: Jan Stancek <jstancek@redhat.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [bug] mkfs.ext[23] hangs on loop device (aarch64, 5.8+)
Date: Tue, 18 Aug 2020 02:19:08 -0400 (EDT) [thread overview]
Message-ID: <1382840777.8967687.1597731548544.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20200818022905.GB2507595@T590>
----- Original Message -----
> I saw this kind io hang in ltp/fs_fill test reliably and the loop is
> over image in tmpfs:
>
> https://lkml.org/lkml/2020/7/26/77
>
> And I have verified that the following patch can fix the issue:
>
> https://lore.kernel.org/linux-block/bc5fa941-3b7c-f28e-dd46-1a1d6e5c40a8@kernel.dk/T/#t
Thanks, I'll test your patch with my setup.
In my case, I traced requests going up to blk_mq_sched_insert_requests(),
but they never made it to loop driver code (loop_queue_rq / lo_complete_rq),
so I assumed they are getting lost somewhere in mq scheduling.
After hang, there were always several requests stuck "inflight":
# cat /sys/kernel/debug/block/loop0/rqos/wbt/inflight
0: inflight 41
1: inflight 0
2: inflight 0
With some additional traces I could see requests being at dispatch list
and state == 0, which appears to fit description of problem you've seen:
blk_mq_sched_insert_requests: blk_mq_sched_insert_requests hctx: ffff000168598000, ctx: fffffdffbff16dc0
wbt_wait: wbt_wait rqos: ffff00016a5e1358, rqw: ffff00016a5e1388, bio: ffff0000da6bbd00, inflight: 41
<wbt_wait goes to sleep>
crash> bio.bi_disk ffff0000da6bbd00
bi_disk = 0xffff000168599800
crash> gendisk.disk_name 0xffff000168599800
disk_name = "loop0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
crash> blk_mq_hw_ctx.queue 0xffff000168598000
queue = 0xffff000117c06800
crash> request_queue.rq_qos 0xffff000117c06800
rq_qos = 0xffff00016a5e1358
crash> blk_mq_hw_ctx.state 0xffff000168598000
state = 0
crash> list blk_mq_hw_ctx.dispatch -h 0xffff000168598000 | wc -l
42
Regards,
Jan
next prev parent reply other threads:[~2020-08-18 6:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94883604.6936811.1596720770623.JavaMail.zimbra@redhat.com>
2020-08-06 17:47 ` [bug] mkfs.ext[23] hangs on loop device (aarch64, 5.8+) Jan Stancek
2020-08-18 2:29 ` Ming Lei
2020-08-18 6:19 ` Jan Stancek [this message]
2020-08-19 6:37 ` Jan Stancek
2020-08-21 9:45 ` [LTP] Fwd: " Jan Stancek
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=1382840777.8967687.1597731548544.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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 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.