btrfs: speedup and avoid inode logging during rename/link
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | btrfs: add helper to delete a dir entry from a log treefs/ | +37 | 0 replies | |
| 2/6 | btrfs: pass the dentry to btrfs_log_new_name() instead of the inodefs/ fs/ fs/ | +19 | 0 replies | |
| 3/6 | btrfs: avoid logging all directory changes during renamesfs/ fs/ fs/ | +66 | 0 replies | |
| 4/6 | btrfs: stop doing unnecessary log updates during a renamefs/ fs/ | +59 | 0 replies | |
| 5/6 | btrfs: avoid inode logging during rename and link when possiblefs/ fs/ | +183 | 1 reply | |
| 6/6 | btrfs: use single variable to track return value at btrfs_log_inode()fs/ | +22 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] btrfs: speedup and avoid inode logging during rename/link
From: Filipe Manana <[email protected]>
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(-)
Signature · 1 line
2.33.0