pub struct ExpertArena { /* private fields */ }Expand description
A ring of pinned per-layer slabs. Slot geometry is one expert record
(record_stride, a 4 KiB multiple so O_DIRECT / RDMA landings are aligned).
Implementations§
Source§impl ExpertArena
impl ExpertArena
Sourcepub fn new(
num_slabs: u32,
slots_per_slab: u32,
record_stride: usize,
) -> Result<Self>
pub fn new( num_slabs: u32, slots_per_slab: u32, record_stride: usize, ) -> Result<Self>
Allocate num_slabs * slots_per_slab * record_stride bytes of pinned
LPDDR and confirm the GB10 same-VA property (fail loudly otherwise — the
zero-copy patch would be silently wrong on a host without it).
pub fn num_slabs(&self) -> u32
pub fn slots_per_slab(&self) -> u32
pub fn record_stride(&self) -> usize
Sourcepub fn slot_host_ptr(&self, slab: u32, slot: u32) -> Result<*mut u8>
pub fn slot_host_ptr(&self, slab: u32, slot: u32) -> Result<*mut u8>
Host pointer of a slot — the O_DIRECT / RDMA landing target.
Sourcepub fn slot_dev_va(&self, slab: u32, slot: u32) -> Result<u64>
pub fn slot_dev_va(&self, slab: u32, slot: u32) -> Result<u64>
Device VA of a slot — what the expert pointer table is patched to.
Sourcepub fn base_ptr(&self) -> *mut c_void
pub fn base_ptr(&self) -> *mut c_void
Raw pinned base as a *mut c_void (for future ibv_reg_mr).
pub fn total_bytes(&self) -> usize
Auto Trait Implementations§
impl Freeze for ExpertArena
impl RefUnwindSafe for ExpertArena
impl Send for ExpertArena
impl Sync for ExpertArena
impl Unpin for ExpertArena
impl UnwindSafe for ExpertArena
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
Mutably borrows from an owned value. Read more