Enum mmtk::util::options::AffinityKind
source · pub enum AffinityKind {
OsDefault,
RoundRobin(Vec<u16>),
}
Expand description
AffinityKind describes how to set the affinity of GC threads. Note that we currently assume that each GC thread is equivalent to an OS or hardware thread.
Variants§
OsDefault
Delegate thread affinity to the OS scheduler
RoundRobin(Vec<u16>)
Assign thread affinities over a list of cores in a round robin fashion. Note that if number of threads > number of cores specified, then multiple threads will be assigned the same core.
Implementations§
source§impl AffinityKind
impl AffinityKind
sourcepub fn resolve_affinity(&self, thread: usize)
pub fn resolve_affinity(&self, thread: usize)
Resolve affinity of GC thread. Has a side-effect of calling into the kernel to set the thread affinity. Note that we assume that each GC thread is equivalent to an OS or hardware thread.
source§impl AffinityKind
impl AffinityKind
sourcefn parse_cpulist(cpulist: &str) -> Result<AffinityKind, String>
fn parse_cpulist(cpulist: &str) -> Result<AffinityKind, String>
Returns an AffinityKind or String containing error. Expects the list of cores to be formatted as numbers separated by commas, including ranges. There should be no spaces between the cores in the list. For example: 0,5,8-11 specifies that the cores 0,5,8,9,10,11 should be used for pinning threads. Performs de-duplication of specified cores. Note that the core list is sorted as a side-effect whenever a new core is added to the set.
Trait Implementations§
source§impl Clone for AffinityKind
impl Clone for AffinityKind
source§fn clone(&self) -> AffinityKind
fn clone(&self) -> AffinityKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AffinityKind
impl Debug for AffinityKind
source§impl FromStr for AffinityKind
impl FromStr for AffinityKind
source§impl PartialEq for AffinityKind
impl PartialEq for AffinityKind
source§fn eq(&self, other: &AffinityKind) -> bool
fn eq(&self, other: &AffinityKind) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AffinityKind
Auto Trait Implementations§
impl RefUnwindSafe for AffinityKind
impl Send for AffinityKind
impl Sync for AffinityKind
impl Unpin for AffinityKind
impl UnwindSafe for AffinityKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more