From: Jens Axboe <axboe@kernel.dk>
To: James Wang <jnwang@suse.com>, efault@gmx.de
Cc: ming.lei@redhat.com, hare@suse.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, mgorman@suse.com
Subject: Re: [PATCH] Fix loop device flush before configure v3
Date: Thu, 8 Jun 2017 08:04:57 -0600 [thread overview]
Message-ID: <7f7d3164-3e0b-25a1-10fd-1cbdf7d2167d@kernel.dk> (raw)
In-Reply-To: <20170608065251.13961-1-jnwang@suse.com>
On 06/08/2017 12:52 AM, James Wang wrote:
> While installing SLES-12 (based on v4.4), I found that the installer
> will stall for 60+ seconds during LVM disk scan. The root cause was
> determined to be the removal of a bound device check in loop_flush()
> by commit b5dd2f6047ca ("block: loop: improve performance via blk-mq").
>
> Restoring this check, examining ->lo_state as set by loop_set_fd()
> eliminates the bad behavior.
>
> Test method:
> modprobe loop max_loop=64
> dd if=/dev/zero of=disk bs=512 count=200K
> for((i=0;i<4;i++))do losetup -f disk; done
> mkfs.ext4 -F /dev/loop0
> for((i=0;i<4;i++))do mkdir t$i; mount /dev/loop$i t$i;done
> for f in `ls /dev/loop[0-9]*|sort`; do \
> echo $f; dd if=$f of=/dev/null bs=512 count=1; \
> done
>
> Test output: stock patched
> /dev/loop0 18.1217e-05 8.3842e-05
> /dev/loop1 6.1114e-05 0.000147979
> /dev/loop10 0.414701 0.000116564
> /dev/loop11 0.7474 6.7942e-05
> /dev/loop12 0.747986 8.9082e-05
> /dev/loop13 0.746532 7.4799e-05
> /dev/loop14 0.480041 9.3926e-05
> /dev/loop15 1.26453 7.2522e-05
>
> Note that from loop10 onward, the device is not mounted, yet the
> stock kernel consumes several orders of magnitude more wall time
> than it does for a mounted device.
> (Thanks for Mike Galbraith <efault@gmx.de>, give a changelog review.)
Added for 4.12, thanks.
--
Jens Axboe
prev parent reply other threads:[~2017-06-08 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 6:52 James Wang
2017-06-08 7:53 ` Johannes Thumshirn
2017-06-08 8:13 ` James Wang
2017-06-08 14:04 ` Jens Axboe [this message]
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=7f7d3164-3e0b-25a1-10fd-1cbdf7d2167d@kernel.dk \
--to=axboe@kernel.dk \
--cc=efault@gmx.de \
--cc=hare@suse.com \
--cc=jnwang@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®