Struct dpdk_unix::HyperThread [−][src]
pub struct HyperThread(_);
Represents a logical hyper thread, which in Operating System terms is usually a logical CPU (core).
These usually map 1:1 with LogicalCores
Methods
impl HyperThread[src]
impl HyperThreadpub fn set_work_queue_hyper_thread_affinity(
hyper_threads: &BTreeSet<HyperThread>,
sys_path: &SysPath
) -> Result<()>[src]
pub fn set_work_queue_hyper_thread_affinity(
hyper_threads: &BTreeSet<HyperThread>,
sys_path: &SysPath
) -> Result<()>Sets workqueue hyper thread affinity.
pub fn last(hyper_threads: &BTreeSet<HyperThread>) -> Option<&Self>[src]
pub fn last(hyper_threads: &BTreeSet<HyperThread>) -> Option<&Self>Last hyper thread.
pub fn complement(
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>[src]
pub fn complement(
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]
pub fn remove_those_offline(
hyper_threads: &BTreeSet<Self>,
sys_path: &SysPath
) -> BTreeSet<Self>Remove as offline hyper_threads.
pub fn present(sys_path: &SysPath) -> BTreeSet<Self>[src]
pub fn present(sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn online(sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn offline(sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn possible(sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn is_online(self, sys_path: &SysPath) -> boolIs 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]
pub fn is_offline(self, sys_path: &SysPath) -> boolIs 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]
pub fn set_offline(self, sys_path: &SysPath) -> Result<()>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]
pub fn set_online(self, sys_path: &SysPath) -> Result<()>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]
pub fn siblings(self, sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn thread_siblings(self, sys_path: &SysPath) -> BTreeSet<Self>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]
pub fn hyper_thread_groups(
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]
pub fn numa_node(self, sys_path: &SysPath) -> Option<u8>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]
pub fn level1_cache_hyper_thread_siblings_including_self(
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]
pub fn level1_cache_hyper_thread_siblings_excluding_self(
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]
pub fn underlying_hardware_physical_core_identifier(
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]
pub fn underlying_hardware_physical_socket_identifier(
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]
pub fn kernel_maximum_index(sys_path: &SysPath) -> Result<Self>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]
impl Default for HyperThreadfn default() -> HyperThread[src]
fn default() -> HyperThreadReturns the "default value" for a type. Read more
impl Debug for HyperThread[src]
impl Debug for HyperThreadfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for HyperThread[src]
impl Copy for HyperThreadimpl Clone for HyperThread[src]
impl Clone for HyperThreadfn clone(&self) -> HyperThread[src]
fn clone(&self) -> HyperThreadReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Ord for HyperThread[src]
impl Ord for HyperThreadfn cmp(&self, other: &HyperThread) -> Ordering[src]
fn cmp(&self, other: &HyperThread) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for HyperThread[src]
impl PartialOrd for HyperThreadfn partial_cmp(&self, other: &HyperThread) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &HyperThread) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &HyperThread) -> bool[src]
fn lt(&self, other: &HyperThread) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &HyperThread) -> bool[src]
fn le(&self, other: &HyperThread) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &HyperThread) -> bool[src]
fn gt(&self, other: &HyperThread) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &HyperThread) -> bool[src]
fn ge(&self, other: &HyperThread) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Eq for HyperThread[src]
impl Eq for HyperThreadimpl PartialEq for HyperThread[src]
impl PartialEq for HyperThreadfn eq(&self, other: &HyperThread) -> bool[src]
fn eq(&self, other: &HyperThread) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &HyperThread) -> bool[src]
fn ne(&self, other: &HyperThread) -> boolThis method tests for !=.
impl Hash for HyperThread[src]
impl Hash for HyperThreadfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl From<u16> for HyperThread[src]
impl From<u16> for HyperThreadimpl Into<u16> for HyperThread[src]
impl Into<u16> for HyperThreadAuto Trait Implementations
impl Send for HyperThread
impl Send for HyperThreadimpl Sync for HyperThread
impl Sync for HyperThread