Skip to content

runtime: I/O API + simulator - #5658

Open
kim wants to merge 11 commits into
masterfrom
kim/sim-io
Open

runtime: I/O API + simulator#5658
kim wants to merge 11 commits into
masterfrom
kim/sim-io

Conversation

@kim

@kim kim commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Adds an io-uring-compatible (file) I/O API with simulator and tokio impls.

The DST runtime uses the simulator to drive I/O operations and inject failures according to a configuration. Failure injection is more or less for demonstration purposes, and may need to become more sophisticated for actual DST.

It is not yet clear how the application-facing API should look like: in any case, we will need a way to enter the runtime context.

kim added 2 commits August 4, 2026 13:24
Entails making it Send + Sync, which may or may not be what we want.
@kim kim changed the title WIP: I/O API + simulator runtime: I/O API + simulator Aug 7, 2026
@kim
kim requested a review from Shubham8287 August 7, 2026 13:33
@kim
kim marked this pull request as ready for review August 7, 2026 13:33
/// in either the submission or completion queue.
pub fn tick(&self, rng: &Rng) -> bool {
let mut progress = false;
for _ in 0..self.config.max_submissions_per_tick {

@Shubham8287 Shubham8287 Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my network side implementation, I have taken a different approach (inspired from tigerbeetle), added duration_at field to events/ops. Which has Driver induced randomness injected from config.

I think for this will translate here like, individual Disk IO ops to have duration_at field, which needs to be expired for events to go in completion queue.

I am wondering if we do duration_at for Disk IO (which we should) then whether current io::Config would be any useful? It doesn't look like both approaches compliments each other.

Also, I have made my Network tick just to waker.wake() all expired tasks every time, as randomness is induced by duration_at itself and further run_all_ready also picks the tasks randomly to poll.

Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants