Repository navigation
crimson/os/seastore: move ool writes from collection lock to concurrent DeviceSubmission phase - #58913
Conversation
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
…bmit_ertr Signed-off-by: Yingxin Cheng <[email protected]>
|
make check is failed by: Should be unrelated. |
|
jenkins test make check |
|
|
jenkins test make check |
myoungwon
left a comment
There was a problem hiding this comment.
It looks good to me if the unit tests pass.
|
jenkins retest this please |
Decouple get_written_to() so it can be queried upon writes. Signed-off-by: Yingxin Cheng <[email protected]>
…ilable Make sure the write base is available upon RecordSubmitter::submit(). Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
No longer need to pass write_base through the write promise. Signed-off-by: Yingxin Cheng <[email protected]>
…upon submit For out-of-line write only. Signed-off-by: Yingxin Cheng <[email protected]>
…submitting writes In order to move the ool write futures out of the collection lock, which will be after the transaction prepare phase. Signed-off-by: Yingxin Cheng <[email protected]>
79d2c51 to
14f9890
Compare
|
make check is failed by: |
|
jenkins test make check |
14f9890 to
e7693ee
Compare
|
jenkins test make check |
…submitting writes In order to move the ool write futures out of the collection lock, which will be after the transaction prepare phase. Signed-off-by: Yingxin Cheng <[email protected]>
Drop the inaccurate written_ prefix because they may be still writting when added to the lists. Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
e7693ee to
25798ff
Compare
So that it is moved out of the collection lock. Signed-off-by: Yingxin Cheng <[email protected]>
Signed-off-by: Yingxin Cheng <[email protected]>
25798ff to
19dbe68
Compare
|
jenkins test api |
|
@cyx1231st IIUC, after the merge of this PR, ool writes may be persisted to disk after the inline writes of the same transaction, is this correct? If so, this might be a problem, since the data can be persisted after the metadata, in which case SeaStore's ondisk state can be corrupted if a restart happens right after the persistence of the metadata but before that of the data. Am I right? I'm very sorry that I failed to notice this issue earlier. |
|
@xxhdx1985126 Appriciate for your insights! Yeah, you're correct that the journal record must be the last one to be written. I'll revert the wrong commit. |
|
I have a question. It seems that this commit (c9e423f) intends to handle OOL writes before submitting records for inline writes. Plus, the device is opened with the dsync option. How could such a situation occur? |
I think it's that there's no guarantee from the seastar side that the ool writes' I/O requests will be issued to the disk before that of the inline writes. |
|
The commit (c9e423f) starts to submit OOL writes before submitting the journal write, true, but it cannot guarantee that OOL writes finish before the journal write. Thus it is possible that during SeaStore restart, a journal record appears valid but its dependent OOL records are partial written, which leads to corruption. |
|
Thanks for explanation! |
Essential changes:
RecordSubmitterto make the write base available upon submitting ool writes.RandomBlockOolWriterto update extents upon submitting writes".SegmentedOolWriterto update ool paddr upon submitting writes".DeviceSubmissionphase, see commit:DeviceSubmissionphase".The issue was observed from #58467, that there are many waiters blocked by the collection lock, and this PR tries to decouple (maybe slow) IO writes out of the lock.
The observed benefits are:
(Further analysis, unrelated to this PR)
However, this PR doesn't address the issue of "too many collection lock waiters" very well, my current understandings are:
[1] Reactor utilizations
[2] SeaStore outstanding transactions (The 4th colume is outside the collection-lock, see *):
[3] Persistent waiter imbalances:
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 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 windowsjenkins test rook e2e