Skip to content

os/bluestore : Refactoring Allocator Class - #61502

Merged
Jayaprakash-ibm merged 3 commits into
ceph:mainfrom
Jayaprakash-ibm:wip-refactor-allocator-class
Mar 4, 2025
Merged

Jayaprakash-ibm merged 3 commits into
ceph:mainfrom
Jayaprakash-ibm:wip-refactor-allocator-class

Conversation

@Jayaprakash-ibm

@Jayaprakash-ibm Jayaprakash-ibm commented Jan 24, 2025 •

Copy link
Copy Markdown
Contributor

Refactoring Allocator class to separate interface and base class

Separated the Allocator class into Base and interface to allow for easier extension and adaptation.

Tracker Ticket : 69314

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

@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch 2 times, most recently from 212fdd0 to 0c279a3 Compare January 30, 2025 20:35
@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch 4 times, most recently from f1dbb7c to e538a44 Compare February 3, 2025 15:15
Comment thread src/os/bluestore/Allocator.h Resolved
@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch from e538a44 to dbbd7de Compare February 5, 2025 14:05
@github-actions github-actions Bot added the tests label Feb 5, 2025
@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch from dbbd7de to cdeb61e Compare February 13, 2025 13:28
@Jayaprakash-ibm
Jayaprakash-ibm marked this pull request as ready for review February 13, 2025 19:19
@Jayaprakash-ibm
Jayaprakash-ibm requested review from a team as code owners February 13, 2025 19:19
@aclamk

aclamk commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

jenkins test make check

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ifed01

ifed01 commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

Overall looks good but my question is whether we really want AllocatorBase be a container for all these helper classes: SocketHook, FreeStateHistogram, etc...
IMO better to have them standalone, keep AllocatorBase pretty simple and implement common Allocator functionality there only.
Perhaps instead we might want to introduce a namespace for all the allocator's stuff.

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor Author

Hi @ifed01,
The Allocator refactor isn’t the end goal but a split to preserve history and ease future changes.
Keeping AllocatorBase simple makes sense, with helper classes as standalone components for better modularity. Since this is a gradual refactor, we can start with the split and refine the structure step by step.
Does this approach align with your thoughts?

@ifed01

ifed01 commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

Hi @ifed01, The Allocator refactor isn’t the end goal but a split to preserve history and ease future changes. Keeping AllocatorBase simple makes sense, with helper classes as standalone components for better modularity. Since this is a gradual refactor, we can start with the split and refine the structure step by step. Does this approach align with your thoughts?

Hey @Jayaprakash-ibm,
so you want to leave this PR as-is and move auxillary stuff out of AllocatorBase class later, right?

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor Author

Hi @ifed01, The Allocator refactor isn’t the end goal but a split to preserve history and ease future changes. Keeping AllocatorBase simple makes sense, with helper classes as standalone components for better modularity. Since this is a gradual refactor, we can start with the split and refine the structure step by step. Does this approach align with your thoughts?

Hey @Jayaprakash-ibm, so you want to leave this PR as-is and move auxillary stuff out of AllocatorBase class later, right?

Yes, that's the plan. I'll keep this PR as-is and handle moving auxiliary components out of AllocatorBase in a follow-up PR's.

@ifed01

ifed01 commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

Hi @ifed01, The Allocator refactor isn’t the end goal but a split to preserve history and ease future changes. Keeping AllocatorBase simple makes sense, with helper classes as standalone components for better modularity. Since this is a gradual refactor, we can start with the split and refine the structure step by step. Does this approach align with your thoughts?

Hey @Jayaprakash-ibm, so you want to leave this PR as-is and move auxillary stuff out of AllocatorBase class later, right?

Yes, that's the plan. I'll keep this PR as-is and handle moving auxiliary components out of AllocatorBase in a follow-up PR's.

Well, doesn't make much sense to me given this PR hasn't run through QA and the proposed changes look trivial. But let it be this way.

@aclamk aclamk added the aclamk-testing-ganymede bluestore testing label Feb 19, 2025
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch from cdeb61e to 4bb7d6c Compare February 25, 2025 12:57
@Jayaprakash-ibm
Jayaprakash-ibm force-pushed the wip-refactor-allocator-class branch from 4bb7d6c to 3327cc0 Compare February 25, 2025 13:09
@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor Author

@Jayaprakash-ibm
Jayaprakash-ibm merged commit 2ab735f into ceph:main Mar 4, 2025
@Naveenaidu

Copy link
Copy Markdown
Contributor

@Jayaprakash-ibm
Jayaprakash-ibm deleted the wip-refactor-allocator-class branch March 10, 2025 18:37
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.

5 participants