From: NeilBrown <neilb@suse.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>, Shaohua Li <shli@fb.com>
Cc: David R <david@unsolicited.net>,
linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: [MD] Crash with 4.12+ kernel and high disk load -- bisected to 4ad23a976413: MD: use per-cpu counter for writes_pending
Date: Tue, 08 Aug 2017 17:01:28 +1000 [thread overview]
Message-ID: <87k22esfuf.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20170807112025.GA3094@light.dominikbrodowski.net>
[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]
On Mon, Aug 07 2017, Dominik Brodowski wrote:
> Neil, Shaohua,
>
> following up on David R's bug message: I have observed something similar
> on v4.12.[345] and v4.13-rc4, but not on v4.11. This is a RAID1 (on bare
> metal partitions, /dev/sdaX and /dev/sdbY linked together). In case it
> matters: Further upwards are cryptsetup, a DM volume group, then logical
> volumes, and then filesystems (ext4, but also happened with xfs).
>
> In a tedious bisect (the bug wasn't as quickly reproducible as I would like,
> but happened when I repeatedly created large lvs and filled them with some
> content, while compiling kernels in parallel), I was able to track this
> down to:
>
>
> commit 4ad23a976413aa57fe5ba7a25953dc35ccca5b71
> Author: NeilBrown <neilb@suse.com>
> Date: Wed Mar 15 14:05:14 2017 +1100
>
> MD: use per-cpu counter for writes_pending
>
> The 'writes_pending' counter is used to determine when the
> array is stable so that it can be marked in the superblock
> as "Clean". Consequently it needs to be updated frequently
> but only checked for zero occasionally. Recent changes to
> raid5 cause the count to be updated even more often - once
> per 4K rather than once per bio. This provided
> justification for making the updates more efficient.
>
> ...
Thanks for the report... and for bisecting and for re-sending...
I believe I have found the problem, and have sent a patch separately.
If mddev->safemode == 1 and mddev->in_sync != 0, md_check_recovery()
causes the thread that calls it to spin.
Prior to the patch you found, that couldn't happen. Now it can,
so it needs to be handled more carefully.
While I was examining the code, I found another bug - so that is a win!
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-08-08 7:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ee7921d2-d3ff-2381-1f05-2c07b8001d08@unsolicited.net>
2017-08-06 17:37 ` RESEND: Crash with 4.12.4 kernel and high disk load (monthly RAID 6 check) David R
2017-08-07 11:20 ` [MD] Crash with 4.12+ kernel and high disk load -- bisected to 4ad23a976413: MD: use per-cpu counter for writes_pending Dominik Brodowski
2017-08-08 4:51 ` Shaohua Li
2017-08-08 6:55 ` David R
2017-08-08 7:01 ` David R
2017-08-08 7:04 ` NeilBrown
2017-08-08 7:10 ` Dominik Brodowski
2017-08-08 7:01 ` NeilBrown [this message]
2017-08-08 7:36 ` Dominik Brodowski
2017-08-08 9:06 ` Dominik Brodowski
2017-08-09 6:28 ` David R
2017-08-08 8:02 ` David R
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=87k22esfuf.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=david@unsolicited.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=shli@fb.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