Skip to main content

SiloConfig

Struct SiloConfig 

Source
#[repr(C)]
pub struct SiloConfig {
Show 21 fields pub mem_min: u64, pub mem_max: u64, pub cpu_shares: u32, pub cpu_quota_us: u64, pub cpu_period_us: u64, pub cpu_affinity_mask: u64, pub max_tasks: u32, pub io_bw_read: u64, pub io_bw_write: u64, pub caps_ptr: u64, pub caps_len: u64, pub flags: u64, pub sid: u32, pub mode: u16, pub family: u8, pub cpu_features_required: u64, pub cpu_features_allowed: u64, pub xcr0_mask: u64, pub graphics_max_sessions: u16, pub graphics_session_ttl_sec: u32, pub graphics_reserved: u16,
}
Expand description

Silo configuration block passed from init to SYS_SILO_CREATE.

Defines resource limits, capabilities, and scheduling parameters for a new silo (process isolation container).

Layout must match the kernel’s definition (ABI contract).

Fields§

§mem_min: u64

Minimum memory reservation in bytes.

§mem_max: u64

Maximum memory limit in bytes (0 = unlimited).

§cpu_shares: u32

CPU scheduling weight (relative priority).

§cpu_quota_us: u64

CPU time quota per period in microseconds (0 = unlimited).

§cpu_period_us: u64

CPU scheduling period in microseconds.

§cpu_affinity_mask: u64

CPU affinity bitmask (0 = any CPU).

§max_tasks: u32

Maximum number of threads/tasks in the silo.

§io_bw_read: u64

Read bandwidth limit in bytes/sec (0 = unlimited).

§io_bw_write: u64

Write bandwidth limit in bytes/sec (0 = unlimited).

§caps_ptr: u64

Pointer to the initial capability list.

§caps_len: u64

Length of the capability list in bytes.

§flags: u64

Silo behavior flags.

§sid: u32

Silo ID (assigned by kernel, 0 = auto-assign).

§mode: u16

Octal permission mode (see SiloMode).

§family: u8

Silo family/type identifier.

§cpu_features_required: u64

Required CPU features (bitmask from CPUID).

§cpu_features_allowed: u64

Allowed CPU features (bitmask, 0 = all allowed).

§xcr0_mask: u64

XCR0 register mask for FPU/SSE/AVX state.

§graphics_max_sessions: u16

Maximum concurrent graphics sessions (0 = no graphics).

§graphics_session_ttl_sec: u32

Graphics session time-to-live in seconds.

§graphics_reserved: u16

Implementations§

Source§

impl SiloConfig

Source

pub const fn zero() -> SiloConfig

Return a zero-initialized silo configuration.

Trait Implementations§

Source§

impl Clone for SiloConfig

Source§

fn clone(&self) -> SiloConfig

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 SiloConfig

Source§

impl Debug for SiloConfig

Source§

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

Formats the value using the given formatter. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.