diff options
author | Ming Lei <ming.lei@canonical.com> | 2015-05-05 14:49:55 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-05-05 22:46:55 +0300 |
commit | 4d4e41aef9429872ea3b105e83426941f7185ab6 (patch) | |
tree | 0d8fec737e450b0e80d9ef884f0b0f70e01f097c /drivers/block/loop.c | |
parent | f4aa4c7bbac6c4afdd4adccf90898c1a3685396d (diff) | |
download | linux-4d4e41aef9429872ea3b105e83426941f7185ab6.tar.xz |
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: b5dd2f6047ca108001328aac0e8588edd15f1778
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>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 3dc15983d3fe..1bee523aa349 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -725,7 +725,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, goto out_putf; error = -ENOMEM; lo->wq = alloc_workqueue("kloopd%d", - WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 0, + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UNBOUND, 16, lo->lo_number); if (!lo->wq) goto out_putf; |