about summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorthe8472 <the8472@users.noreply.github.com>2022-07-22 22:18:07 +0200
committerGitHub <noreply@github.com>2022-07-22 22:18:07 +0200
commit2e33c812e8b1bea563893f17ff5edcb7023d5d41 (patch)
treeb9c882c33a6917c67b4055ca7975bd195d6e470d /library/std/src/thread
parentb2c410ec572de2e0f3b0b2af0fc6546d0bcd626b (diff)
downloadrust-2e33c812e8b1bea563893f17ff5edcb7023d5d41.tar.gz
rust-2e33c812e8b1bea563893f17ff5edcb7023d5d41.zip
[review] mention that runtime may scale with # of mountpoints
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index f02a7de04e5..add93b618a6 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1575,6 +1575,11 @@ fn _assert_sync_and_send() {
 ///   queried, e.g. due to sandboxing.
 /// - It may undercount the amount of parallelism if the current thread's affinity mask
 ///   does not reflect the process' cpuset, e.g. due to pinned threads.
+/// - If the process is in a cgroup v1 cpu controller, this may need to
+///   scan mountpoints to find the corresponding cgroup v1 controller,
+///   which may take time on systems with large numbers of mountpoints.
+///   (This does not apply to cgroup v2, or to processes not in a
+///   cgroup.)
 ///
 /// On all targets:
 /// - It may overcount the amount of parallelism available when running in a VM