Comments (8)
Currently working on a POC for this.
from tokio-uring.
@FrankReh I agree completely on a Write trait, as well as a Read trait. I think these should be called OwnedWrite
and OwnedRead
.
from tokio-uring.
Okay. I'll keep my write_all to myself for now, but it means my other work I wanted to commit as PRs is blocked because the test case(s) use the write_all. Your Owned{Write, Read} aren't blocked by my work so I'll wait for those traits to land.
BTW my write_all is a trivial modification to the write_all in std so you may be providing it yourself in OwnedWrite. No prob. In fact, I had to decide between basing the loop on the IoBuf or Slice type and I choose Slice for no real good reason. I was going to ask your opinion anyway.
from tokio-uring.
No, go ahead and open up a PR. I'm doing some refactoring right now in my PR and I don't want to block anyone with this.
from tokio-uring.
@Noah-Kennedy Just a reminder that ProvideBuffers will be very nice to support with this library. I don't know how that factors into your OwnedWrite and OwnedRead trait plans. Maybe they are orthogonal. Once I get the builder api for you to look at and perhaps approved, I'll see about a builder method that lets the caller either provide buffers or call out the library to allocate its own buffers. Of course ownership of the original buffer might make it hard for me to figure out how to provide both options so I may start with the library allocating the buffers, given parameters to a builder method.
The existing io-uring library supports buffers for reading and writing to files. Interesting as a first step, but using buffers to do multi recv and recvmsg is what's really interesting to me and that comes with the next kernel, 6.0, due in Oct, next month.
Maybe this deserves its own issue. Ownership and the drop method for these fixed buffers will be interesting.
from tokio-uring.
@FrankReh I think that we may need to add some additional buffer traits that abstract over things uring ops can use as buffers for use within op builders internally.
from tokio-uring.
@Noah-Kennedy I'm all ears. I've created #112 to discuss fixed buffers with a pbuf_ring feature introduced in 5.19. Maybe related to internal traits, maybe not.
from tokio-uring.
Thanks!
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.