Hi all, My goal is to add latency for each I/O without blocking the submission path. Now I can know how long each I/O should wait before it’s submitted to the AIO queue via a model. Now the question is how can I make the I/O wait for that long time before it’s finally handled by worker threads.
I’m thinking about adding a timer for each block I/O and its callback function will do the submission job. Below is some of my thought and questions about this idea: (1). The callback will be triggered by the thread where corresponding event queue locates, not VCPU thread which previously submits I/Os. How can I make safely submit I/O from the event-queue thread? (2). If each I/O is associated with a timer, and we also put per-I/O timer into the event queue. Will the event queue be capable of handling intensive I/O timers in accurate timing manner? (3). Which device interface would be better to work on? From my perspective, the virtio-data-plane would be a good choice since it has its own thread and event queue. (4). Any other concerns about this idea? Any suggestions will be greatly appreciated. Thanks for all your time. Best, Huaicheng