Repository navigation
crimson/os/seastore: drop backrefs in cases of pure rbm seastores - #66740
Conversation
58add8a to
3caf675
Compare
|
jenkins test make check |
There was a problem hiding this comment.
nit: "Drop Backref tree concept on RBM Devices"
I think we should state somewhere (can_drop_backref definition?) that non-segmented devices do not rely on backward mapping (of logical addresses to physical ones) since its used only for GC.
Secondly, is the idea here to improve performance by dropping the backref tree maintaining operations? Or simply avoiding the redundant complexity of maintaining the additional tree?
| auto scan_visitor = std::move(f); | ||
| co_await with_btree<LBABtree>( | ||
| cache, c, | ||
| seastar::coroutine::lambda{ |
There was a problem hiding this comment.
With C++ 23 we can deduce this instead of the dedicated wrapper.
See: https://docs.seastar.io/master/tutorial.html#lambda-coroutines-c-23-and-later
| co_await LBABtree::iterate_repeat( | ||
| c, | ||
| btree.lower_bound(c, L_ADDR_MIN), | ||
| seastar::coroutine::lambda{ |
| DEBUGT("scan lba tree", t); | ||
| auto c = get_context(t); | ||
| auto scan_visitor = std::move(f); | ||
| co_await with_btree<LBABtree>( |
There was a problem hiding this comment.
with_btree get the root node, construct the tree instance using the root and keep it safe with seastar::do_with. IIUC, we don't need this wrapper here anymore:
auto cache_root = co_await cache.get_root(c.trans);
auto btree = LBABtree(croot);
There was a problem hiding this comment.
Yep, a huge win of using coroutines is not needing helpers like with_btree which take a lambda.
| [c, &scan_visitor, FNAME, this](auto &btree) | ||
| -> scan_mapped_space_ret { | ||
| auto block_size = cache.get_block_size(); | ||
| co_await LBABtree::iterate_repeat( |
There was a problem hiding this comment.
I think we should be able to avoid the ertr repeat here and moving to a while loop (similarly to a02f6b0) the stop_iteration obj complicates the code IMO. However, in order to not stall this PR - we can follow up on this later.
There was a problem hiding this comment.
I'd really prefer that this simply use a loop, shouldn't be too hard to update. Note, since we don't need with_btree, this would just be a loop in the top level coroutine.
| ceph_assert(depth >= 1); | ||
| return scan_visitor(paddr, len, type, key); | ||
| }; | ||
| co_await LBABtree::iterate_repeat( |
There was a problem hiding this comment.
This too can probably just be a loop. We really want to avoid using the helpers when not necessary. (Unless I'm missing something LBABtree::iterate_repeat does?)
athanatos
left a comment
There was a problem hiding this comment.
LGTM other than my comments.
Signed-off-by: Xuehan Xu <[email protected]>
3caf675 to
d97d09e
Compare
|
@Matan-B @athanatos Just modified the code as suggested, please take a look, again. Thanks:-) |
| @@ -487,9 +494,12 @@ class JournalTrimmer { | |||
| return get_journal_head_sequence() + 1 - | |||
| get_journal_tail().segment_seq; | |||
| } | |||
| protected: | |||
| bool tail_include_alloc = true; | |||
There was a problem hiding this comment.
Can you please help me understand the new member? How is it related to the backref skipping?
There was a problem hiding this comment.
At present, the journal contains two kinds of deltas: dirty modification deltas and space allocation deltas, the latter is used for modifying the backref tree. So, when the backref tree is no more, the corrresponding allocation deltas are not needed when calculating the journal tail. This field is an indicator about whether to include space allocation deltas when calculating the journal tail.
| // pure rbm | ||
| p_backend_type == backend_type_t::SEGMENTED || cold_sms); |
There was a problem hiding this comment.
Can you explain this comment please?
There was a problem hiding this comment.
Sorry about the vague comment, it means this is a case when all the backends are RBM ones, will clarify it in the comment.
| @@ -112,14 +112,17 @@ struct lba_map_val_t { | |||
| // laddr of a direct lba mapping(see btree_lba_manager.h) | |||
| extent_ref_count_t refcount = 0; ///< refcount | |||
| checksum_t checksum = 0; ///< checksum of original block written at paddr (TODO) | |||
| extent_types_t type = extent_types_t::NONE; | |||
There was a problem hiding this comment.
Should we let operator<< print the type?
There was a problem hiding this comment.
Are there any users of this member?
There was a problem hiding this comment.
There was a problem hiding this comment.
Should we let operator<< print the type?
Yeah, right.
d97d09e to
1116301
Compare
instancees Signed-off-by: Xuehan Xu <[email protected]>
Signed-off-by: Xuehan Xu <[email protected]>
1116301 to
dac670a
Compare
|
@Matan-B @athanatos Just modified the code to make it more clear, please take a look again, thanks:-) |
|
jenkins test make check arm64 |
|
All tests are good, accept:
|
|
@xxhdx1985126, do we have an estimate by any chance as to how much this affects perf? |
…ackref crimson/os/seastore: drop backrefs in cases of pure rbm seastores Reviewed-by: Samuel Just <[email protected]>
Sorry, I missed this comment, will try to evaluate it:-) |
Signed-off-by: Xuehan Xu [email protected]
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.