[−][src]Struct io_uring::Builder
IoUring build params
Implementations
impl Builder
[src]
pub fn dontfork(&mut self) -> &mut Self
[src]
Do not make this io_uring instance accessible by child processes after a fork.
pub fn setup_iopoll(&mut self) -> &mut Self
[src]
Perform busy-waiting for I/O completion events, as opposed to getting notifications via an asynchronous IRQ (Interrupt Request). This will reduce latency, but increases CPU usage.
This is only usable on file systems that support polling and files opened with O_DIRECT
.
pub fn setup_sqpoll(&mut self, idle: u32) -> &mut Self
[src]
Use a kernel thread to perform submission queue polling. This allows your application to issue I/O without ever context switching into the kernel, however it does use up a lot more CPU. You should use it when you are expecting very large amounts of I/O.
After idle
seconds, the kernel thread will go to sleep and you will have to wake it up
again with a system call (this is handled by Submitter::submit
and
Submitter::submit_and_wait
automatically).
When using this, you must register all file descriptors with the Submitter
via
Submitter::register_files
.
This requires root priviliges.
pub fn setup_sqpoll_cpu(&mut self, cpu: u32) -> &mut Self
[src]
Bind the kernel's poll thread to the specified cpu. This flag is only meaningful when
Builder::setup_sqpoll
is enabled.
pub fn setup_cqsize(&mut self, entries: u32) -> &mut Self
[src]
Create the completion queue with the specified number of entries. The value must be greater
than entries
, and may be rounded up to the next power-of-two.
pub fn setup_clamp(&mut self) -> &mut Self
[src]
Clamp the sizes of the submission queue and completion queue at their maximum values instead of returning an error when you attempt to resize them beyond their maximum values.
pub fn setup_attach_wq(&mut self, fd: RawFd) -> &mut Self
[src]
Share the asynchronous worker thread backend of this io_uring with the specified io_uring file descriptor instead of creating a new thread pool.
pub fn setup_r_disabled(&mut self) -> &mut Self
[src]
Start the io_uring instance with all its rings disabled. This allows you to register
restrictions, buffers and files before the kernel starts processing submission queue
events. You are only able to register restrictions when
the rings are disabled due to concurrency issues. You can enable the rings with
Submitter::register_enable_rings
.
Requires the unstable
feature.
pub fn build(&self, entries: u32) -> Result<IoUring>
[src]
Build an IoUring, with the specified number of entries in the submission queue and
completion queue unless setup_cqsize
has been called.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
[src]
impl Send for Builder
[src]
impl Sync for Builder
[src]
impl Unpin for Builder
[src]
impl UnwindSafe for Builder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,