Open Noah-Kennedy opened 1 year ago
Linking a previous attempt adding DIO support https://github.com/tokio-rs/tokio-uring/pull/73
Hello!
I was looking at @ahrens comment in the earlier #73 issue here about being able to provide custom direct buffers by implementing traits.
This made me wonder whether it is possible today to use direct IO in tokio_uring by:
clib::O_DIRECT
flag, and then converting it using File::from_std
.This seems possible from what I understand about uring and what I've read in the tokio_uring docs.
Has anyone done this? Is there something I'm overlooking or a hidden gotcha I should be aware of, before I try it myself?
Direct IO is important for my database implementation, since I want to rely on my own cache instead of the OS buffer pool.
Async direct IO is a very useful feature of io_uring, and it would be awesome to have this capability in here.
This will probably need another abstracted buffer API for aligned buffers.
It may be useful to look at the APIs in glommio for prior art.