Repository navigation
crimson/os/seastore/segment_cleaner: misc cleanups and improvements - #46158
Conversation
972a07b to
52fb032
Compare
|
This PR seems to modify dirty_tail/_limit to only advance on segment bounds. I think that's going to tend to cause us to clean entries in larger chunks and introduce more latency variance in the future. I think I'd prefer to preserve the ability to represent/clean dirty entries within a segment in chunks smaller than a full segment. |
I think it is reasonable to preserve the ability to set trim target/limit within the segment, but IIUC the previous implementation is broken as we didn't set the correct segment-id to So I thought the simplest workaround was to reset the offset to Fixed in d84fae3 |
52fb032 to
6ebcee1
Compare
|
Changeset:
|
|
jenkins test api |
Arguably, we should just remove segment_id from journal_seq_t. That can wait for another PR though. |
There was a problem hiding this comment.
This will still result in an underestimate of the total space used since the sum of extent_info_t's of a record won't be equal to the full size of the header (deltas, etc). Is it worth adding this complexity just to reduce the severity of that underestimate? Moreover, for usage ratio calculations, arguably a segment with a disproportionate amount of overhead really should be have a lower utilization ratio. I'm not sure this is worth it.
There was a problem hiding this comment.
Agreed, dropped the commit.
There was a problem hiding this comment.
Where are we doing this comparison? I'm a bit leery of a tuple comparison that ignores one of the elements. It may be correct in the case you are fixing, but I worry that future users will be surprised by this behavior. I think other than this, we could:
- remove segment_id from journal_seq_t
- add a different journal_seq_t::cmp_seq_offset() static method with this behavior and update the caller
- change the comparison from (seq, id, offset) to (seq, offset, id) rather than to (seq, offset)
There was a problem hiding this comment.
change the comparison from (seq, id, offset) to (seq, offset, id) rather than to (seq, offset)
See 4a7fe81, I think this option is more appropriate as most of the users of journal_seq_t needs the physical location from segment-id, such as journal-tail, scan_valid_records_cursor and write_result_t.
Where are we doing this comparison?
As far as I know:
ceph/src/crimson/os/seastore/cache.cc
Lines 1404 to 1406 in 75a9cbb
ceph/src/crimson/os/seastore/segment_cleaner.h
Line 1050 in 75a9cbb
ceph/src/crimson/os/seastore/segment_cleaner.h
Line 1050 in 75a9cbb
ceph/src/crimson/os/seastore/segment_cleaner.cc
Lines 481 to 514 in 75a9cbb
ceph/src/crimson/os/seastore/seastore_types.cc
Lines 648 to 662 in 75a9cbb
There was a problem hiding this comment.
This usage of 11 and 12 is pretty magic. At the very least add constants, but I think segment_util should probably just have two extra members.
There was a problem hiding this comment.
See above, I think this would be a bit too tough for a reader to follow.
|
LGTM other than the questions I left above. |
8d58751 to
02a3ce3
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
02a3ce3 to
cff6a82
Compare
|
Changeset:
|
@xxhdx1985126 from the above log, seems the trim_backref transaction 0x615000598d80 is trying to insert |
Yeah, I've found the root cause, and am testing the fix, the pr of which should be submitted later today:-) |
cff6a82 to
f04a31c
Compare
Thanks! Rebased. |
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
…opping flag Signed-off-by: Yingxin Cheng <[email protected]>
…used() Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
* unify update_segment_avail_bytes() and set_journal_head() interfaces. * reuse segment_info_t::written_to to get the current journal head. * more strict validations about journal head maintainence. Signed-off-by: Yingxin Cheng <[email protected]>
…n open segments Signed-off-by: Yingxin Cheng <[email protected]>
…nreclaimable and reclaimable Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
…open segments Signed-off-by: Yingxin Cheng <[email protected]>
…journal segments Signed-off-by: Yingxin Cheng <[email protected]>
…nt open/close/release Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
f04a31c to
538f955
Compare
|
jenkins test api |






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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows