From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Cc: quwenruo@cn.fujitsu.com
Subject: [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue
Date: Thu, 12 Sep 2013 16:08:15 +0800 [thread overview]
Message-ID: <1378973304-11693-1-git-send-email-quwenruo@cn.fujitsu.com> (raw)
Use kernel workqueue and kernel workqueue based new btrfs_workqueue_struct to replace
the old btrfs_workers.
The main goal is to reduce the redundant codes(800 lines vs 200 lines) and
try to get benefits from the latest workqueue changes.
About the performance, the test suite I used is bonnie++,
and there seems no significant regression.
The patched kernel get the following difference vs the 3.10 kernel on an HDD
with a two-way 4cores server.(10times each and compare the average)
putc: -0.97%
getc: +1.48%
random_del: +2.38%
random_create: -2.27%
seq_del +0.94%
Other changes are smaller than 0.5% and can be ignored.
Since the tests are not enough and maybe unstable,
any further tests are welcome.
------
Changelog:
v1->v2: In patch 2/9
Add "ret=-ENOMEM" for some workqueue allocation in scrub.c.
Add qgroup_rescan_workers allocation check.
------
Qu Wenruo (9):
btrfs: Cleanup the unused struct async_sched.
btrfs: use kernel workqueue to replace the btrfs_workers functions
btrfs: Added btrfs_workqueue_struct implemented ordered execution
based on kernel workqueue
btrfs: Add high priority workqueue support for btrfs_workqueue_struct
btrfs: Use btrfs_workqueue_struct to replace the fs_info->workers
btrfs: Use btrfs_workqueue_struct to replace the
fs_info->delalloc_workers
btrfs: Replace the fs_info->submit_workers with kernel workqueue.
btrfs: Cleanup the old btrfs workqueue
btrfs: Replace thread_pool_size with workqueue default value
fs/btrfs/Makefile | 5 +-
fs/btrfs/async-thread.c | 714 -----------------------------------------------
fs/btrfs/async-thread.h | 119 --------
fs/btrfs/bwq.c | 136 +++++++++
fs/btrfs/bwq.h | 67 +++++
fs/btrfs/ctree.h | 46 ++-
fs/btrfs/delayed-inode.c | 9 +-
fs/btrfs/dev-replace.c | 1 -
fs/btrfs/disk-io.c | 238 ++++++----------
fs/btrfs/extent-tree.c | 6 +-
fs/btrfs/inode.c | 57 ++--
fs/btrfs/ordered-data.c | 11 +-
fs/btrfs/ordered-data.h | 4 +-
fs/btrfs/qgroup.c | 16 +-
fs/btrfs/raid56.c | 38 ++-
fs/btrfs/reada.c | 8 +-
fs/btrfs/relocation.c | 1 -
fs/btrfs/scrub.c | 78 +++---
fs/btrfs/super.c | 41 ++-
fs/btrfs/volumes.c | 25 +-
fs/btrfs/volumes.h | 3 +-
21 files changed, 451 insertions(+), 1172 deletions(-)
delete mode 100644 fs/btrfs/async-thread.c
delete mode 100644 fs/btrfs/async-thread.h
create mode 100644 fs/btrfs/bwq.c
create mode 100644 fs/btrfs/bwq.h
--
1.8.4
next reply other threads:[~2013-09-12 8:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 8:08 Qu Wenruo [this message]
2013-09-12 8:08 ` [PATCH v2 1/9] btrfs: Cleanup the unused struct async_sched Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 2/9] btrfs: use kernel workqueue to replace the btrfs_workers functions Qu Wenruo
2013-09-13 1:29 ` Liu Bo
2013-09-13 1:45 ` Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 3/9] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 4/9] btrfs: Add high priority workqueue support for btrfs_workqueue_struct Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 5/9] btrfs: Use btrfs_workqueue_struct to replace the fs_info->workers Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 6/9] btrfs: Use btrfs_workqueue_struct to replace the fs_info->delalloc_workers Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 7/9] btrfs: Replace the fs_info->submit_workers with kernel workqueue Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 8/9] btrfs: Cleanup the old btrfs workqueue Qu Wenruo
2013-09-12 8:08 ` [PATCH v2 9/9] btrfs: Replace thread_pool_size with workqueue default value Qu Wenruo
2013-09-13 1:47 ` Liu Bo
2013-09-13 3:15 ` Qu Wenruo
2013-09-17 2:41 ` Qu Wenruo
2013-09-12 17:37 ` [PATCH v2 0/9] btrfs: Replace the btrfs_workers with kernel workqueue David Sterba
2013-09-13 2:03 ` Qu Wenruo
2013-09-20 6:13 ` Qu Wenruo
2013-10-01 14:50 ` David Sterba
2013-10-02 1:50 ` Qu Wenruo
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=1378973304-11693-1-git-send-email-quwenruo@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=linux-btrfs@vger.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;
as well as URLs for NNTP newsgroup(s).