linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] address lock contention of btree root
@ 2018-08-16 21:07 Liu Bo
  2018-08-16 21:07 ` [PATCH 1/2] Btrfs: kill btrfs_clear_path_blocking Liu Bo
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Liu Bo @ 2018-08-16 21:07 UTC (permalink / raw)
  To: linux-btrfs

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-08-23  9:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-16 21:07 [PATCH 0/2] address lock contention of btree root Liu Bo
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

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).