From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/6] btrfs: speedup and avoid inode logging during rename/link
Date: Thu, 20 Jan 2022 11:00:05 +0000 [thread overview]
Message-ID: <cover.1642676248.git.fdmanana@suse.com> (raw)
From: Filipe Manana <fdmanana@suse.com>
Often rename and link operations need to update inodes that were logged
before, and often they trigger inode logging when it's not possible to
quickly determine if the inode was previously logged in the current
transaction.
This patchset speedups renames either by updating more efficiently a
previously logged directory or by avoiding triggering inode logging when
not needed. This can make all the difference, specially before all the
recent massive optimizations to directory logging between 5.16, upcoming
5.17 and other other changes in misc-next.
An openSUSE Tumbleweed user recently ran into an issue where package
installation/upgrades with the zypper tool were very slow, and it turned
out zypper was spending over 99% of its time on rename operations, which
were doing directory logging, and some of the packages required renaming
over 1700 files. The issue only happened on a 5.15 kernel, and it was
indirectly caused by excessive inode eviction, happening almost 100x more
when compared to 5.13, 5.14 and 5.16-rc[6,7,8] kernels. That in turn
resulted in logging inodes during renames when that would not happen if
inode eviction hadn't happen. More details on the changelogs of patches
3/6 to 5/6.
Filipe Manana (6):
btrfs: add helper to delete a dir entry from a log tree
btrfs: pass the dentry to btrfs_log_new_name() instead of the inode
btrfs: avoid logging all directory changes during renames
btrfs: stop doing unnecessary log updates during a rename
btrfs: avoid inode logging during rename and link when possible
btrfs: use single variable to track return value at btrfs_log_inode()
fs/btrfs/inode.c | 177 ++++++------------
fs/btrfs/tree-log.c | 431 +++++++++++++++++++++++++++++++-------------
fs/btrfs/tree-log.h | 7 +-
3 files changed, 364 insertions(+), 251 deletions(-)
--
2.33.0
next reply other threads:[~2022-01-20 11:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 11:00 fdmanana [this message]
2022-01-20 11:00 ` [PATCH 1/6] btrfs: add helper to delete a dir entry from a log tree fdmanana
2022-01-20 11:00 ` [PATCH 2/6] btrfs: pass the dentry to btrfs_log_new_name() instead of the inode fdmanana
2022-01-20 11:00 ` [PATCH 3/6] btrfs: avoid logging all directory changes during renames fdmanana
2022-01-20 11:00 ` [PATCH 4/6] btrfs: stop doing unnecessary log updates during a rename fdmanana
2022-01-20 11:00 ` [PATCH 5/6] btrfs: avoid inode logging during rename and link when possible fdmanana
2022-02-02 16:49 ` Filipe Manana
2022-01-20 11:00 ` [PATCH 6/6] btrfs: use single variable to track return value at btrfs_log_inode() fdmanana
2022-01-25 17:42 ` [PATCH 0/6] btrfs: speedup and avoid inode logging during rename/link David Sterba
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=cover.1642676248.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--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).