pub enum GpuDirectCapability {
Available {
stats: String,
},
Unavailable {
reason: &'static str,
},
FeatureDisabled,
}Expand description
Result of probing the host for GPUDirect Storage support.
Variants§
Available
The host exposes nvidia-fs and the kernel reports the driver as enabled.
Fields
Probe ran but nvidia-fs isn’t installed or the driver is
disabled. Callers fall back to IORING_OP_READ_FIXED into
host-visible GPU memory - still zero-copy past the PCIe
root complex, but not bypassed.
FeatureDisabled
The uring-cmd-nvme feature is compiled out; no GPUDirect
probe ran. Loudly surface this so a caller that explicitly
expected the fast path sees the config mismatch.
Implementations§
Source§impl GpuDirectCapability
impl GpuDirectCapability
Sourcepub fn probe() -> Self
pub fn probe() -> Self
Probe the host.
Reads /proc/driver/nvidia-fs/stats. Presence of the file +
non-empty contents = Available. A file-not-found or
permission error = Unavailable with a structured reason.
Non-Linux / feature-disabled hosts return FeatureDisabled.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
True when the fast path is available and callers should
construct a GpuMappedBuffer::from_bar1_peer-backed region.
Trait Implementations§
Source§impl Clone for GpuDirectCapability
impl Clone for GpuDirectCapability
Source§fn clone(&self) -> GpuDirectCapability
fn clone(&self) -> GpuDirectCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GpuDirectCapability
impl Debug for GpuDirectCapability
Source§impl PartialEq for GpuDirectCapability
impl PartialEq for GpuDirectCapability
Source§fn eq(&self, other: &GpuDirectCapability) -> bool
fn eq(&self, other: &GpuDirectCapability) -> bool
self and other values to be equal, and is used by ==.impl Eq for GpuDirectCapability
impl StructuralPartialEq for GpuDirectCapability
Auto Trait Implementations§
impl Freeze for GpuDirectCapability
impl RefUnwindSafe for GpuDirectCapability
impl Send for GpuDirectCapability
impl Sync for GpuDirectCapability
impl Unpin for GpuDirectCapability
impl UnsafeUnpin for GpuDirectCapability
impl UnwindSafe for GpuDirectCapability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.