From: Ming Lei <ming.lei@canonical.com>
To: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Cc: "Justin M. Forbes" <jforbes@fedoraproject.org>,
Jeff Moyer <jmoyer@redhat.com>, Tejun Heo <tj@kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Ming Lei <ming.lei@canonical.com>, stable@vger.kernel.org (v4.0)
Subject: [PATCH 2/2] block: loop: avoiding too many pending per work I/O
Date: Tue, 5 May 2015 19:49:55 +0800 [thread overview]
Message-ID: <1430826595-5888-3-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1430826595-5888-1-git-send-email-ming.lei@canonical.com>
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>
---
drivers/block/loop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3dc1598..1bee523 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;
--
1.9.1
next prev parent reply other threads:[~2015-05-05 11:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 11:49 [PATCH 0/2] block: loop: fix stacked loop and performance regression Ming Lei
2015-05-05 11:49 ` [PATCH 1/2] block: loop: convert to per-device workqueue Ming Lei
2015-05-05 14:00 ` Tejun Heo
2015-05-26 22:29 ` Dave Kleikamp
2015-05-05 11:49 ` Ming Lei [this message]
2015-05-05 13:59 ` [PATCH 2/2] block: loop: avoiding too many pending per work I/O Tejun Heo
2015-05-05 14:46 ` Ming Lei
2015-05-05 16:55 ` Tejun Heo
2015-05-06 3:14 ` Ming Lei
2015-05-06 5:17 ` Ming Lei
2015-05-06 7:36 ` Christoph Hellwig
2015-05-06 11:43 ` Ming Lei
2015-05-22 12:36 ` Josh Boyer
2015-05-22 13:32 ` Ming Lei
2015-05-05 19:01 ` [PATCH 0/2] block: loop: fix stacked loop and performance regression Justin M. Forbes
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=1430826595-5888-3-git-send-email-ming.lei@canonical.com \
--to=ming.lei@canonical.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=jforbes@fedoraproject.org \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
/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®