btrfs: some more speedups for directory logging/fsync
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | btrfs: don't log unnecessary boundary keys when logging directoryfs/ | +21 | 0 replies | |
| 2/4 | btrfs: put initial index value of a directory in a constantfs/ fs/ | +12 | 0 replies | |
| 3/4 | btrfs: stop copying old dir items when logging a directoryfs/ | +53 | 0 replies | |
| 4/4 | btrfs: stop trying to log subdirectories created in past transactionsfs/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] btrfs: some more speedups for directory logging/fsync
From: Filipe Manana <[email protected]>
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(-)
Signature · 1 line
2.33.0