#[repr(C, align(32))]pub struct LoadEntry {
pub queue_depth: u32,
pub capacity: u32,
pub messages_processed: u64,
pub steal_requests: u32,
pub offer_count: u32,
pub load_score: u32,
pub _pad: u32,
}Expand description
Per-actor load entry in the shared load table.
This structure is stored in mapped memory (or global memory on GPU) so both the scheduler warp and the host can read/write it.
Fields§
§queue_depth: u32Current input queue depth.
capacity: u32Queue capacity.
messages_processed: u64Total messages processed (monotonic counter for throughput).
steal_requests: u32Pending steal requests (atomically incremented by thieves).
offer_count: u32Messages available for stealing (set by owner when depth > share_threshold).
load_score: u32Load score: queue_depth * 256 / capacity (0-255, for fast comparison).
_pad: u32Padding to 32 bytes.
Implementations§
Source§impl LoadEntry
impl LoadEntry
Sourcepub fn compute_load_score(&mut self)
pub fn compute_load_score(&mut self)
Compute the load score (0-255) from queue depth and capacity.
Sourcepub fn is_overloaded(&self, threshold: u32) -> bool
pub fn is_overloaded(&self, threshold: u32) -> bool
Check if this actor is overloaded (should offer work).
Sourcepub fn is_underloaded(&self, threshold: u32) -> bool
pub fn is_underloaded(&self, threshold: u32) -> bool
Check if this actor is underloaded (should steal work).
Trait Implementations§
impl Copy for LoadEntry
Auto Trait Implementations§
impl Freeze for LoadEntry
impl RefUnwindSafe for LoadEntry
impl Send for LoadEntry
impl Sync for LoadEntry
impl Unpin for LoadEntry
impl UnsafeUnpin for LoadEntry
impl UnwindSafe for LoadEntry
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.