Skip to main content

CpuLoadSummary

Struct CpuLoadSummary 

Source
pub struct CpuLoadSummary { /* private fields */ }
Expand description

Allocation-free lockless hints used by remote placement and balancing.

Implementations§

Source§

impl CpuLoadSummary

Source

pub const fn queued_count(self) -> usize

Returns candidates available to pick_next_task(), excluding current.

Source

pub const fn nr_running(self) -> usize

Returns Linux rq->nr_running, including a non-idle current task.

Source

pub const fn fair_demand(self) -> u64

Returns the Linux nice-weighted Fair demand owned by this CPU.

Source

pub const fn workload_demand(self) -> u64

Returns instantaneous scheduling demand in normal-nice weight units.

Fair work contributes its exact nice weight. RT and Deadline work each contribute one normal-nice capacity unit until class-specific utilization tracking is available.

Source

pub const fn current_workload_demand(self) -> u64

Returns the demand contributed by this CPU’s non-idle current task.

Source

pub const fn has_pushable_fair(self) -> bool

Reports whether this CPU has migratable Fair work.

RT and Deadline overload are deliberately absent from this load snapshot. Their sole remote authority is the root-domain rto/dlo index, matching Linux’s separation between sched-domain load and priority-class overload state.

Source

pub const fn fair_idle_only(self) -> bool

Reports whether every runnable task on this CPU uses SCHED_IDLE.

Mirrors Linux sched_idle_rq(): a non-idle Fair wakee may treat this rq as an idle placement target.

Source

pub const fn fair_delayed_count(self) -> usize

Returns Linux cfs_rq->h_nr_delayed for this flat runqueue.

Trait Implementations§

Source§

impl Clone for CpuLoadSummary

Source§

fn clone(&self) -> CpuLoadSummary

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CpuLoadSummary

Source§

impl Debug for CpuLoadSummary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CpuLoadSummary

Source§

impl PartialEq for CpuLoadSummary

Source§

fn eq(&self, other: &CpuLoadSummary) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CpuLoadSummary

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.