Comments (7)
This is tokio-uring
, not rio
. If you have a question about this, I'm happy to answer it, but I am not familiar with the implementation details of rio
.
from tokio-uring.
@Noah-Kennedy Sorry, it was a copy/paste error and I haven't got any response from rio
so my questions are generally the same and I slightly edited. would be great to know how tokio-uring can help? hope my question is generic enough if not please let me know
from tokio-uring.
So, IO functions/methods in tokio-uring
will push a SQE to the submission queue. In current releases, these operations are immediately submitted to the kernel, resulting in a syscall. On the master branch, we have implemented batching, and thus we will submit all operations in the queue if it becomes full when constructing an op, and will also submit all operations to the kernel before parking, so system calls tend to be pretty efficiently amortized across operations.
I'd also like to get hooks into tokio at some point to allow us to submit operations periodically when tokio runs it's internal maintenance routine.
from tokio-uring.
@Noah-Kennedy Got it, so I need to use master, because if it submits a syscall for every operation then that defeats the purpose of io_uring altogether. I am glad to hear that batching is implemented internally but does it submit to kernel only when the buffer is full? what if the buffer isn't full? is there any timer? if not, then why not let users batch their syscalls and provide a function like submit_all
?
from tokio-uring.
If we attempt to push an operation but the buffer is full, we submit all operations in the buffer to make space and then push.
There is no timer for periodic dispatch. This is better implemented by hooking into the maintenance loop of tokio.
Allowing users to control their own batching is something I'd like to get implemented soon, alongside some newer APIs that give more fine-grained control of operation submission.
from tokio-uring.
Got it, But again what if the buffer isn't full? it will stay in queue forever? I didn't mean to say timer in isolation but a combination of buffer size and the timer or let the user take care of it all!
from tokio-uring.
Currently on master, when there isn't work to do (ie the system parks), it will flush the squeue and submit. This isn't released yet because this isn't exactly ideal; we need to get hooks into tokio to periodically flush the queue every X task polls (I forget how often the tokio maintenance loop runs).
from tokio-uring.
Related Issues (20)
- Proposal for overhaul of buffer representation HOT 11
- multi_thread support HOT 5
- Direct IO HOT 2
- Support _msg syscalls HOT 4
- impl Clone for stream types?
- Add chunks() for BoundedBuf
- Not in a runtime context is not always true HOT 5
- Return msghdr from `recvmsg`
- DPDK support? HOT 5
- Dead or dying? HOT 9
- Support for windows IOCP (input/output completion ports) another completion-based async API HOT 1
- Is it support `splice` operation now?
- New Release? HOT 3
- tokio-uring missing similar tokio runtime builder options
- io_uring command support? HOT 3
- Support for IO_LINK feature
- Restructuring HOT 2
- __io_uring_buf_ring_cq_advance broken? HOT 1
- [BUG] Hangs when using iopoll without sqpoll HOT 2
- Expose access to io_uring in the form of submission and completion queues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokio-uring.