]> git.baikalelectronics.ru Git - kernel.git/commit
block: loop: avoiding too many pending per work I/O
authorMing Lei <ming.lei@canonical.com>
Tue, 5 May 2015 11:49:55 +0000 (19:49 +0800)
committerJens Axboe <axboe@fb.com>
Tue, 5 May 2015 19:46:55 +0000 (13:46 -0600)
commit1027b529df6792f012a56302adddb61d6431fc11
tree0d8fec737e450b0e80d9ef884f0b0f70e01f097c
parentd24f6d4334a1323769387ff13e7ec6d5cb5be775
block: loop: avoiding too many pending per work I/O

If there are too many pending per work I/O, too many
high priority work thread can be generated so that
system performance can be effected.

This patch limits the max_active parameter of workqueue as 16.

This patch fixes Fedora 22 live booting performance
regression when it is booted from squashfs over dm
based on loop, and looks the following reasons are
related with the problem:

- not like other filesyststems(such as ext4), squashfs
is a bit special, and I observed that increasing I/O jobs
to access file in squashfs only improve I/O performance a
little, but it can make big difference for ext4

- nested loop: both squashfs.img and ext3fs.img are mounted
as loop block, and ext3fs.img is inside the squashfs

- during booting, lots of tasks may run concurrently

Fixes: e0e6ea37c2c8379fb4983ec5ea158d61ea8346e6
Cc: stable@vger.kernel.org (v4.0)
Cc: Justin M. Forbes <jforbes@fedoraproject.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/loop.c