Skip to content

crimson/os/seastore: cleanups around lba parent-child pointer - #56028

Merged
cyx1231st merged 8 commits into
ceph:mainfrom
cyx1231st:wip-seastore-cleanup-lba
Mar 13, 2024
Merged

cyx1231st merged 8 commits into
ceph:mainfrom
cyx1231st:wip-seastore-cleanup-lba

Conversation

@cyx1231st

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

Distinguish caching vs absent get_extent interfaces, and misc related
cleanups.

After the lba parent-child pointer optimization, the absent path should
be used.

Signed-off-by: Yingxin Cheng <[email protected]>
Comment thread src/crimson/os/seastore/cache.h Outdated

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.

Looks is_initial_pending() is also possible here.

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.

Seems all kinds of valid extents are possible, parent/child link does apply to mutation-pending extents (#55831 (comment))

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.

Changed to is_valid() only.

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.

Looking at the callers of get_extent_viewable_by_trans(), seems to me that the extent can be mutation-pending only if it is root, so the invariant here could be:
assert(extent->is_root() ? extent->is_valid() : (extent->is_stable() || extent->is_initial_pending()));

@cyx1231st
cyx1231st force-pushed the wip-seastore-cleanup-lba branch from e885bd9 to cfc20e1 Compare March 8, 2024 02:32
@cyx1231st
cyx1231st requested a review from xxhdx1985126 March 8, 2024 02:48
@cyx1231st
cyx1231st force-pushed the wip-seastore-cleanup-lba branch from cfc20e1 to 2d2df50 Compare March 8, 2024 07:51
@cyx1231st
cyx1231st marked this pull request as ready for review March 11, 2024 08:49
@cyx1231st
cyx1231st requested a review from a team as a code owner March 11, 2024 08:49
@cyx1231st

cyx1231st commented Mar 11, 2024 •

Copy link
Copy Markdown
Member Author

Looks passing the UTs, can you help review @xxhdx1985126 ?

@xxhdx1985126 xxhdx1985126 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.

LGTM

* t *must not* have retired offset
*
* Note, the current implementation leverages parent-child
* pointers in LBA instead, so it should only be called in tests.

@xxhdx1985126 xxhdx1985126 Mar 11, 2024 •

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.

Not in this context, but I've thinking that, since we retrieve all extents through lba/backref trees, Cache::extents only serves as an extent holder instead of an extent index and may not be necessary of type ExtentIndex, it seems an intrusive list is enough, What do you think? This should avoid the unnecessary cpu overhead caused by inserting extent into Cache::extents.

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.

Not in this context.

Is it fine to keep this comment, or you suggest to modify in some way?

But I've thinking that, since we retrieve all extents through lba/backref trees, Cache::extents only serves as an extent holder instead of an extent index and may not be necessary of type ExtentIndex, it seems an intrusive list is enough, What do you think? This should avoid the unnecessary cpu overhead caused by inserting extent into Cache::extents.

This makes sense to me. Also refer to #47749 (comment) that I thought we should skip query_cache() in the non-test path.

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.

Not in this context.

Is it fine to keep this comment, or you suggest to modify in some way?

Ah, sorry, I meant what I was going to suggest was not in this context, not the comment in the code:-)

@cyx1231st

Copy link
Copy Markdown
Member Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants