From: Liu Bo <bo.liu@linux.alibaba.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH 0/2] address lock contention of btree root
Date: Fri, 17 Aug 2018 05:07:23 +0800 [thread overview]
Message-ID: <1534453645-17714-1-git-send-email-bo.liu@linux.alibaba.com> (raw)
The lock contention on btree nodes (esp. root node) is apparently a
bottleneck when there're multiple readers and writers concurrently
trying to access them. Unfortunately this is by design and it's not
easy to fix it unless with some complex changes, however, there is
still some room.
With a stable workload based on fsmark which has 16 threads creating
1,600K files, we could see that a good amount of overhead comes from
switching path between spinning mode and blocking mode in
btrfs_search_slot().
Patch 1 provides more details about the overhead and test results from
fsmark and dbench.
Patch 2 kills leave_spinning due to the behaviour change from patch 1.
Liu Bo (2):
Btrfs: kill btrfs_clear_path_blocking
Btrfs: kill leave_spinning
fs/btrfs/backref.c | 3 --
fs/btrfs/ctree.c | 73 +++++--------------------------------------
fs/btrfs/ctree.h | 3 --
fs/btrfs/delayed-inode.c | 7 -----
fs/btrfs/dir-item.c | 1 -
fs/btrfs/export.c | 1 -
fs/btrfs/extent-tree.c | 7 -----
fs/btrfs/extent_io.c | 1 -
fs/btrfs/file-item.c | 4 ---
fs/btrfs/free-space-tree.c | 2 --
fs/btrfs/inode-item.c | 6 ----
fs/btrfs/inode.c | 8 -----
fs/btrfs/ioctl.c | 3 --
fs/btrfs/qgroup.c | 2 --
fs/btrfs/super.c | 2 --
fs/btrfs/tests/qgroup-tests.c | 4 ---
16 files changed, 7 insertions(+), 120 deletions(-)
--
1.8.3.1
next reply other threads:[~2018-08-17 0:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 21:07 Liu Bo [this message]
2018-08-16 21:07 ` [PATCH 1/2] Btrfs: kill btrfs_clear_path_blocking Liu Bo
2018-08-17 7:24 ` Nikolay Borisov
2018-08-20 6:07 ` Liu Bo
2018-08-20 7:31 ` Nikolay Borisov
2018-08-21 17:24 ` Liu Bo
2018-08-16 21:07 ` [PATCH 2/2] Btrfs: kill leave_spinning Liu Bo
2018-08-21 22:19 ` Liu Bo
2018-08-21 17:54 ` [PATCH 0/2] address lock contention of btree root Chris Mason
2018-08-21 18:15 ` Liu Bo
2018-08-21 18:35 ` Holger Hoffstätte
2018-08-21 21:59 ` Liu Bo
2018-08-21 18:48 ` Chris Mason
2018-08-21 22:23 ` Liu Bo
2018-08-22 21:38 ` Liu Bo
2018-08-23 5:46 ` Nikolay Borisov
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=1534453645-17714-1-git-send-email-bo.liu@linux.alibaba.com \
--to=bo.liu@linux.alibaba.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).