Skip to content

crimson/os/seastore: introduce BtreeCursor to simplify the implementation of LBAMapping/BackrefMapping - #62071

Merged
cyx1231st merged 22 commits into
ceph:mainfrom
zhscn:wip-lba-mapping-refactor
May 21, 2025
Merged

cyx1231st merged 22 commits into
ceph:mainfrom
zhscn:wip-lba-mapping-refactor

Conversation

@zhscn

@zhscn zhscn commented Mar 1, 2025 •

Copy link
Copy Markdown
Member

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@zhscn
zhscn force-pushed the wip-lba-mapping-refactor branch from 2752f75 to c10fd40 Compare March 1, 2025 13:08
@xxhdx1985126
xxhdx1985126 force-pushed the wip-lba-mapping-refactor branch 4 times, most recently from 2180d67 to 2afe221 Compare March 3, 2025 09:46
@xxhdx1985126
xxhdx1985126 marked this pull request as ready for review March 3, 2025 11:30
@xxhdx1985126
xxhdx1985126 requested a review from a team as a code owner March 3, 2025 11:30
@xxhdx1985126
xxhdx1985126 requested a review from cyx1231st March 3, 2025 11:30
@Matan-B Matan-B removed this from Ceph-Dashboard Mar 3, 2025
@Matan-B Matan-B added this to Crimson Mar 3, 2025
@Matan-B Matan-B moved this to Awaits review in Crimson Mar 3, 2025
@cyx1231st

Copy link
Copy Markdown
Member

@zhscn can you rename this PR title, it has a same name with PR61261 -- not really useful for others to understand the actual goal other than refactoring.

@zhscn zhscn changed the title crimson/os/seastore: refactor LBAMapping crimson/os/seastore: indroduce BtreeCursor to simplify the implementation of LBAMapping/BackrefMapping Mar 4, 2025
@zhscn

zhscn commented Mar 4, 2025 •

Copy link
Copy Markdown
Member Author

The "BtreeCursor" is from "BtreeValueIter" in #60814 , avoid confusion with FixedKVBtree::iterator in LBAManager/BackrefManager.

@xxhdx1985126 xxhdx1985126 changed the title crimson/os/seastore: indroduce BtreeCursor to simplify the implementation of LBAMapping/BackrefMapping crimson/os/seastore: introduce BtreeCursor to simplify the implementation of LBAMapping/BackrefMapping Mar 4, 2025
@cyx1231st

Copy link
Copy Markdown
Member

This PR replaces the previous work #60814

Added label crimson_perf, I suppose it is helpful to the performance of lba/backref tree iterations.

@zhscn

zhscn commented Mar 6, 2025

Copy link
Copy Markdown
Member Author

The BtreeCursor has not yet been part of LBAManager's API, but the necessary functionality, like FixedKVBtree::make_partial_iter, is included in this PR. The new LBAManager API design will be handled by @xxhdx1985126.

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looking, I feel these refactors are great !

@zhscn I see, this PR isn't directly related to crimson-perf yet.

Comment thread src/crimson/os/seastore/cached_extent.h Resolved
Comment thread src/crimson/os/seastore/lba_mapping.h Resolved

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why LBACursorRef and BackrefCursorRef are necessary ?

They look to be very small and lightweight structures, is it reasonable to avoid allocate them from heap ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of LBACursor is 74 bytes and BackrefCursor is 66 bytes, which are not as small as they look.

@cyx1231st cyx1231st Mar 7, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there are considerable malloc and free overhead from perf.

It's fine to deal with them later, though.

@cyx1231st

cyx1231st commented May 20, 2025 •

Copy link
Copy Markdown
Member

Since the issue https://tracker.ceph.com/issues/71383 is also present from the baseline tests, I'm good to leave the fix separately.

I can schedule another round of tests after rebased.

@xxhdx1985126

Copy link
Copy Markdown
Member

Since the issue https://tracker.ceph.com/issues/71383 is also present from the baseline tests, I'm good to leave the fix separately.

I can schedule another round of tests after rebased.

I've just pushed a PR fixing this issue: #63376, please take a look, thanks:-)

@zhscn

zhscn commented May 21, 2025

Copy link
Copy Markdown
Member Author

jenkins test api

@cyx1231st

Copy link
Copy Markdown
Member

crimson_has_followup: #62071 (comment)

@zhscn

zhscn commented May 21, 2025

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged (Pre Umbrella cutoff)

Development

Successfully merging this pull request may close these issues.

4 participants