Skip to content

perform(ext4): prevent lmbench ext4_create_delete_files_0k_ops timeout by indexing the orphan chain - #2346

Closed
mistcoversmyeyes wants to merge 2 commits into
DragonOS-Community:masterfrom
mistcoversmyeyes:fix/lmbench-latfs-2327
Closed

mistcoversmyeyes wants to merge 2 commits into
DragonOS-Community:masterfrom
mistcoversmyeyes:fix/lmbench-latfs-2327

Conversation

@mistcoversmyeyes

@mistcoversmyeyes mistcoversmyeyes commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2327. Related: #2286.

A large final-unlink backlog repeatedly validates the entire ext4 legacy orphan chain and walks it again to find a reclaim predecessor. This makes create/delete batches increasingly expensive. The default lat_fs size sweep exceeded its original 120-second deadline; a stopped-state sample during deletion found validate_chain called by legacy_orphan_contains / unlink_inode.

Keep a membership/predecessor index for the validated logical chain. Initial use and any aborted index update still validate the complete chain, while normal add/remove transitions update the index under the existing metadata mutation gate. Removal rereads the target and predecessor and verifies allocation, checksums, inode generation and links. Transaction drop/abort invalidates provisional changes; successful logical publication retains them, and an older batch checkpoint cannot revive an invalidated index. Replay invalidates the index. No on-disk format or journal credit budget changes.

  • Baseline original wrapper exceeded 120 seconds. In a fresh fixed guest with ENOUGH, TIMING_O and LOOP_O explicitly unset, the original ext4_create_delete_files_0k_ops.sh completed all default 0/1/4/10 KiB stages with exit status 0 within the same deadline. No size selection, calibration parameter or deadline was changed; this is a completion check, not a controlled throughput comparison.
  • make kernel, rustfmt and git diff --check passed.
  • 206 another_ext4 unit tests passed, including index transitions, abort/drop, successful direct/journal/batch publication, and journal failure boundaries.
  • Real-image namespace_transactions (including both persistence models), batched_delalloc, and batched_fragmented_reclaim regressions passed with their filesystem consistency checks.
  • Reclaim, linked-tail final unlink and linked-tail rename recovery fault matrices passed for writeback and writethrough persistence.

@mistcoversmyeyes
mistcoversmyeyes marked this pull request as draft September 25, 2026 09:24
@mistcoversmyeyes
mistcoversmyeyes force-pushed the fix/lmbench-latfs-2327 branch 2 times, most recently from f958aae to 271b270 Compare September 27, 2026 05:55
@mistcoversmyeyes
mistcoversmyeyes deleted the fix/lmbench-latfs-2327 branch September 27, 2026 07:13
@mistcoversmyeyes
mistcoversmyeyes restored the fix/lmbench-latfs-2327 branch September 27, 2026 07:28
@mistcoversmyeyes
mistcoversmyeyes marked this pull request as ready for review September 27, 2026 07:37
@mistcoversmyeyes
mistcoversmyeyes marked this pull request as draft September 27, 2026 09:02
@mistcoversmyeyes mistcoversmyeyes changed the title fix(ext4): index validated orphan chains across transactions perform(ext4): index validated orphan chains across transactions Sep 29, 2026
@github-actions github-actions Bot added the ambiguous The title of PR/issue doesn't match the format label Sep 29, 2026
@mistcoversmyeyes mistcoversmyeyes changed the title perform(ext4): index validated orphan chains across transactions perform(ext4): prevent lmbench ext4_create_delete_files_0k_ops timeout by indexing the orphan chain Sep 30, 2026
@mistcoversmyeyes

Copy link
Copy Markdown
Collaborator Author

由 #2392 替代(superseded by #2392)。

修复提交保持为 aca084db2cb6632ab882786a888760c1b6857561,技术说明与验证记录已保留到新 PR。新 PR 继续通过 Fixes #2327 关联 ext4_create_delete_files_0k_ops 的 orphan 链重复扫描性能问题。本次仅迁移分支命名和 PR,不新增测试结论。

@mistcoversmyeyes
mistcoversmyeyes deleted the fix/lmbench-latfs-2327 branch October 6, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ambiguous The title of PR/issue doesn't match the format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ext4): ext4_create_delete_files_0k_ops test_case times out with a performance bottleneck in repeated orphan-chain traversal

1 participant