[−][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]
impl HyperThread
pub fn set_work_queue_hyper_thread_affinity( | [src] |
Sets workqueue hyper thread affinity.
pub fn force_watchdog_to_just_these_hyper_threads( | [src] |
We ignore failures as the /proc
for this is brittle.
Should not be needed if nohz_full
was specified on the Linux command line.
pub fn last(hyper_threads: &BTreeSet<HyperThread>) -> Option<&Self> | [src] |
Last hyper thread.
pub fn complement( | [src] |
The complement of hyper_threads
.
pub fn remove_those_offline( | [src] |
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( | [src] |
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( | [src] |
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( | [src] |
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( | [src] |
Underlying hardware, not Linux, core identifier.
See https://www.kernel.org/doc/Documentation/cputopology.txt.
pub fn underlying_hardware_physical_socket_identifier( | [src] |
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.
pub fn current_hyper_thread() -> Self | [src] |
Current hyper thread index that this thread is running on.
Unless this thread has been scheduled to only run on this hyper thread, then the result is close to useless.
Topology is not available on FreeBSD; value will always be zero.
Trait Implementations
impl From<u16> for HyperThread
[src]
impl From<u16> for HyperThread
impl Eq for HyperThread
[src]
impl Eq for HyperThread
impl Into<u16> for HyperThread
[src]
impl Into<u16> for HyperThread
impl PartialOrd<HyperThread> for HyperThread
[src]
impl PartialOrd<HyperThread> for HyperThread
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 Copy for HyperThread
[src]
impl Copy for HyperThread
impl Default for HyperThread
[src]
impl Default for HyperThread
fn default() -> HyperThread | [src] |
impl PartialEq<HyperThread> for HyperThread
[src]
impl PartialEq<HyperThread> for HyperThread
fn eq(&self, other: &HyperThread) -> bool | [src] |
fn ne(&self, other: &HyperThread) -> bool | [src] |
impl Clone for HyperThread
[src]
impl Clone for HyperThread
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]
impl Ord for HyperThread
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 Debug for HyperThread
[src]
impl Debug for HyperThread
impl Hash for HyperThread
[src]
impl Hash for HyperThread
fn hash<__H: Hasher>(&self, state: &mut __H) | [src] |
fn hash_slice<H>(data: &[Self], state: &mut H) where | 1.3.0 [src] |
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for HyperThread
[src]
impl Serialize for HyperThread
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where | [src] |
impl<'de> Deserialize<'de> for HyperThread
[src]
impl<'de> Deserialize<'de> for HyperThread
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where | [src] |
Auto Trait Implementations
impl Send for HyperThread
impl Send for HyperThread
impl Sync for HyperThread
impl Sync for HyperThread
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
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]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
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> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,