[−][src]Struct dpdk_unix::hyper_thread::HyperThread
Represents a logical hyper thread, which in Operating System terms is usually a logical CPU (core).
These usually map 1:1 with LogicalCore
s.
Methods
impl HyperThread
[src]
pub fn set_work_queue_hyper_thread_affinity(
hyper_threads: &BTreeSet<HyperThread>,
sys_path: &SysPath
) -> Result<()>
[src]
hyper_threads: &BTreeSet<HyperThread>,
sys_path: &SysPath
) -> Result<()>
Sets workqueue hyper thread affinity.
pub fn last(hyper_threads: &BTreeSet<HyperThread>) -> Option<&Self>
[src]
Last hyper thread.
pub fn complement(
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>
[src]
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>
The complement of hyper_threads
.
pub fn remove_those_offline(
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>
[src]
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>
Remove as offline hyper_threads
.
pub fn present(sys_path: &SysPath) -> BTreeSet<Self>
[src]
CPUs (hyper threaded logical cores) that are present and that could become online.
Consider using libnuma instead of this call.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn online(sys_path: &SysPath) -> BTreeSet<Self>
[src]
Hyper threaded logical cores that are online at some point.
Consider using libnuma instead of this call.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn offline(sys_path: &SysPath) -> BTreeSet<Self>
[src]
Hyper threaded logical cores that are offline.
The maximum CPU index in this list can exceed the kernel's maximum in self.kernel_maximum_index
.
Close to useless.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn possible(sys_path: &SysPath) -> BTreeSet<Self>
[src]
Hyper threaded logical cores that could possibly be online at some point.
Close to very useless.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn is_online(self, sys_path: &SysPath) -> bool
[src]
Is this hyper thread online?
See https://www.kernel.org/doc/Documentation/core-api/cpu_hotplug.rst.
pub fn is_offline(self, sys_path: &SysPath) -> bool
[src]
Is this hyper thread offline?
See https://www.kernel.org/doc/Documentation/core-api/cpu_hotplug.rst.
pub fn set_offline(self, sys_path: &SysPath) -> Result<()>
[src]
Disable (offline) this hyper thread.
Requires root.
Hyper thread (CPU) zero (0) is special on x86 / x86-64 and can not ordinarily be offlined.
See https://www.kernel.org/doc/Documentation/core-api/cpu_hotplug.rst.
pub fn set_online(self, sys_path: &SysPath) -> Result<()>
[src]
Enable (online) this hyper thread.
Requires root.
See https://www.kernel.org/doc/Documentation/core-api/cpu_hotplug.rst.
pub fn siblings(self, sys_path: &SysPath) -> BTreeSet<Self>
[src]
Hyper threaded logical cores that are siblings of this one.
Will include self
.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn thread_siblings(self, sys_path: &SysPath) -> BTreeSet<Self>
[src]
Hyper threaded logical cores that are hyper-thread-siblings of this one.
Will include self
.
Usually wrong on virtual machines (eg Parallels Desktop).
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn hyper_thread_groups(
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<BTreeSet<Self>>
[src]
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<BTreeSet<Self>>
Hyper threaded logical cores grouped as hyper thread groups (eg HT 0 and 1, 2 and 3, etc).
pub fn numa_node(self, sys_path: &SysPath) -> Option<u8>
[src]
Tries to find this hyper thread's NUMA node, if this is a NUMA machine.
pub fn level1_cache_hyper_thread_siblings_including_self(
self,
sys_path: &SysPath
) -> BTreeSet<Self>
[src]
self,
sys_path: &SysPath
) -> BTreeSet<Self>
Hyper threaded logical cores that are thread-siblings of this one according to the level 1 cache.
Will include self
.
Usually reliable.
pub fn level1_cache_hyper_thread_siblings_excluding_self(
self,
sys_path: &SysPath
) -> BTreeSet<Self>
[src]
self,
sys_path: &SysPath
) -> BTreeSet<Self>
Hyper threaded logical cores that are thread-siblings of this one according to the level 1 cache.
Will exclude self
.
Usually reliable.
pub fn underlying_hardware_physical_core_identifier(
self,
sys_path: &SysPath
) -> Result<u16>
[src]
self,
sys_path: &SysPath
) -> Result<u16>
Underlying hardware, not Linux, core identifier.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn underlying_hardware_physical_socket_identifier(
self,
sys_path: &SysPath
) -> Result<u16>
[src]
self,
sys_path: &SysPath
) -> Result<u16>
Underlying hardware, not Linux, socket identifier.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn kernel_maximum_index(sys_path: &SysPath) -> Result<Self>
[src]
Simply reports the maximum identifier that could be used by the Linux kernel upto the CONFIG_
number of CPUs.
Add one to this to get the exclusive maximum.
Consider using libnuma instead of this call.
Trait Implementations
impl Default for HyperThread
[src]
fn default() -> HyperThread
[src]
impl Clone for HyperThread
[src]
fn clone(&self) -> HyperThread
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for HyperThread
[src]
fn cmp(&self, other: &HyperThread) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl From<u16> for HyperThread
[src]
impl Eq for HyperThread
[src]
impl Into<u16> for HyperThread
[src]
impl Copy for HyperThread
[src]
impl PartialOrd<HyperThread> for HyperThread
[src]
fn partial_cmp(&self, other: &HyperThread) -> Option<Ordering>
[src]
fn lt(&self, other: &HyperThread) -> bool
[src]
fn le(&self, other: &HyperThread) -> bool
[src]
fn gt(&self, other: &HyperThread) -> bool
[src]
fn ge(&self, other: &HyperThread) -> bool
[src]
impl PartialEq<HyperThread> for HyperThread
[src]
fn eq(&self, other: &HyperThread) -> bool
[src]
fn ne(&self, other: &HyperThread) -> bool
[src]
impl Hash for HyperThread
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for HyperThread
[src]
impl<'de> Deserialize<'de> for HyperThread
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for HyperThread
[src]
Auto Trait Implementations
impl Send for HyperThread
impl Sync for HyperThread
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,