From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/4] btrfs: some more speedups for directory logging/fsync
Date: Wed, 15 Dec 2021 12:19:57 +0000 [thread overview]
Message-ID: <cover.1639568905.git.fdmanana@suse.com> (raw)
From: Filipe Manana <fdmanana@suse.com>
This patchset brings some more performance improvements for directory
logging/fsync, by doing some changes to the logging algorithm to avoid
logging dentries created in past transactions, which helps reducing a
lot the amount of logged metadata, and therefore less IO as well for
large directories.
It specially benefits the case when some dentries were removed, either
due to file deletes or renames, where it can reduce the total time spent
in an fsync by an order of magnitude even if the number of dentries removed
is a small percentage of the total dentries in the directory (for e.g. as
little as 1%, like in the test results of the changelog of patch 3/4).
This builds on top of my previous patchset to make directory logging copy
only dir index keys and skip dir item keys, which has been on misc-next
since the previous merge window closed.
Patches 1/4 and 3/4 are the changes that accomplish this, while patch 2/4
is just preparation for patch 3/4, and patch 4/4 is more of a cleanup of
old, unnecessary and unreliable logic. Test case generic/335 was recently
updated in fstests, so that after applying patch 4/4 it passes.
Patch 3/4 contains in its changelog the test and results.
We are close to the 5.17 merge window, holiday season is approaching and
there's already a significant change for directory logging coming to 5.17
(log only dir index keys and skip dir item keys), so I think this patchset
is better suited for the 5.18 merge window.
Thanks.
Filipe Manana (4):
btrfs: don't log unnecessary boundary keys when logging directory
btrfs: put initial index value of a directory in a constant
btrfs: stop copying old dir items when logging a directory
btrfs: stop trying to log subdirectories created in past transactions
fs/btrfs/btrfs_inode.h | 12 +++-
fs/btrfs/inode.c | 10 +---
fs/btrfs/tree-log.c | 123 +++++++++++++++++++++++++----------------
3 files changed, 86 insertions(+), 59 deletions(-)
--
2.33.0
next reply other threads:[~2021-12-15 12:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 12:19 fdmanana [this message]
2021-12-15 12:19 ` [PATCH 1/4] btrfs: don't log unnecessary boundary keys when logging directory fdmanana
2021-12-15 12:19 ` [PATCH 2/4] btrfs: put initial index value of a directory in a constant fdmanana
2021-12-15 12:20 ` [PATCH 3/4] btrfs: stop copying old dir items when logging a directory fdmanana
2021-12-15 12:20 ` [PATCH 4/4] btrfs: stop trying to log subdirectories created in past transactions fdmanana
2022-01-06 15:31 ` [PATCH 0/4] btrfs: some more speedups for directory logging/fsync 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.1639568905.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