Repository navigation
crimson/os/seastore: wake blocked IO on BackgroundProcess wakeup - #69275
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
16 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Ensures blocked user I/O can be re-evaluated after the background process wakes from a blocking sleep, preventing scenarios where user I/O remains blocked without another trigger.
Changes:
- Invoke
maybe_wake_blocked_io()immediately after waking fromblocking_background. - Add explanatory comment describing the “blocked IO stuck” scenario and rationale.
BackgroundProcess::run() blocks on blocking_background when background_should_run() returns false. When the loop wakes up — typically because arm_blocking_io_and_wake() kicked it — the loop re-checks background_should_run(). If that still returns false (e.g. the cleaner has no pending work), the loop goes straight back to sleep. But the wake may also have been triggered by a change in the space- availability condition (should_block_io) — and there is no path that re-evaluates blocked user IO when background_should_run is false. The blocked IO has no future trigger to re-check, and stays stuck until the next unrelated wake-up happens to come at the right moment, or never. Add a maybe_wake_blocked_io() call right after the wake. It's a no-op when nothing is blocked, and unblocks IO that the space condition has already cleared otherwise. Observed in sustained random-write benches that wedged with IO blocked indefinitely while the cleaner sat idle (should_run=false). Signed-off-by: Shai Fultheim <[email protected]>
0b6986c to
8f3a166
Compare
|
Rebased on the latest upstream main branch to align with recent community commits and resolved minor comment style warnings. No functional logic changes were made in this rebase. |
|
|
Thank you! From the failures the only seastore failed ones are https://tracker.ceph.com/issues/77402 which are not related, merging. |
|
ok to test |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
No unique failures detected when reviewing Jose's branch run. |
|
jenkins test make check arm64 |
Summary
Closes a latent deadlock window in
ExtentPlacementManager::BackgroundProcess::run(): whenbackground_should_run()is false but the space-availability condition (should_block_io) has just become satisfied, the wake-up loop returns to sleep without re-checking blocked IO. The blocked IO stays stuck until some unrelated future wake-up happens to coincide, or never.The fix is a single
maybe_wake_blocked_io()call right after the wake, before the loop re-checksbackground_should_run(). It's a no-op when nothing is blocked.Why it matters
Observed in sustained random-write benches where IO stalled indefinitely while the cleaner sat idle. The bug only fires in a narrow race (cleaner work just ended at the same moment IO unblock was due) but the failure mode is permanent IO block — no further trigger ever re-checks.
Test plan
mainContribution Guidelines
main