Skip to content

Commit

Permalink
Expand available_parallelism docs in anticipation of cgroup quotas
Browse files Browse the repository at this point in the history
The "fixed" in "fixed steady state limits" means to exclude load-dependent resource prioritization
that would calculate to 100% of capacity on an idle system and less capacity on a loaded system.

Additionally I also exclude "system load" since it would be silly to try to identify
other, perhaps higher priority, processes hogging some CPU cores that aren't explicitly excluded
by masks/quotas/whatever.
  • Loading branch information
the8472 committed Nov 19, 2021
1 parent 18fa434 commit 39b98e8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions library/std/src/thread/mod.rs
Expand Up @@ -1460,9 +1460,12 @@ fn _assert_sync_and_send() {
/// The purpose of this API is to provide an easy and portable way to query
/// the default amount of parallelism the program should use. Among other things it
/// does not expose information on NUMA regions, does not account for
/// differences in (co)processor capabilities, and will not modify the program's
/// global state in order to more accurately query the amount of available
/// parallelism.
/// differences in (co)processor capabilities or current system load,
/// and will not modify the program's global state in order to more accurately
/// query the amount of available parallelism.
///
/// Where both fixed steady-state and burst limits are available the steady-state
/// capacity will be used to ensure more predictable latencies.
///
/// Resource limits can be changed during the runtime of a program, therefore the value is
/// not cached and instead recomputed every time this function is called. It should not be
Expand Down

0 comments on commit 39b98e8

Please sign in to comment.