Repository navigation
Conversation
Virv12
force-pushed
the
nvme
branch
2 times, most recently
from
September 8, 2026 22:31
4a2a219 to
bfca8fd
Compare
wait_ready and submit busy-waited with uefi::boot::stall in a tight loop, blocking the whole single-threaded cooperative executor for up to ~10s on every controller state change and NVMe command completion. Replace that with the same wait_for_interrupt()/sleep() cooperative wait net_poll already uses, so other tasks (network, UI, input) keep running during disk I/O. A synchronous fallback (submit_sync/wait_ready_sync/transfer_sync) is kept for the sync GPT-parsing path (gpt_disk_io::BlockIo can't await) and for Drop teardown, which can't be async either. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYnqytnV7A4KAdLkgqw1fD
Executor::sleep()/wait_for_interrupt() only re-check their condition when the executor wakes from hlt for some interrupt, and nothing wires up a real interrupt for this controller, so select(wait_for_interrupt, sleep(10us)) gave no real latency bound: each retry could block far longer than 10us waiting for an unrelated interrupt to fire at all, turning tens of thousands of small NVMe commands during a store/flash into a multi-minute operation instead of ~10s. Use Executor::sched_yield() instead: it re-queues the task and gets re-polled on the executor's very next pass, so it stays about as fast as the original busy-wait while still interleaving with other ready tasks. Since sched_yield's iteration cost is no longer a fixed duration, bound the retry loop by wall-clock time (Timer::micros(), a plain TSC read) rather than a fixed iteration count. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYnqytnV7A4KAdLkgqw1fD
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.