You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_num_threads_logical: with no OS/C stdlib dependency on x86 (all other arch need privileges to access specific registers)
get_num_threads_physical: with no OS/C stdlib dependency on x86 (all other arch need privileges to access specific registers)
get_num_threads_os: takes into account disabled cores (Virtual machines)
get_num_threads_process: Takes into account cgroup, schedaffinity and taskset.
Goals:
Allow counting physical and/or logical cores without syscalls/IO on Linux x86 (no /proc or /sys read) for hardened trusted enclaves like SGX and full no C stdlib support.
Allow counting available cores on Linux when running constrained by cgroups, CPUSET, taskset, scheduler affinity, especially in LXC, Docker and Kubernetes containers.
Unfortunately I don't think there is a way to detect more granular time quotas (in Docker/Kubernetes) as opposed to just restricting available CPUs.
Followup on #293
get_num_threads_logical
: with no OS/C stdlib dependency on x86 (all other arch need privileges to access specific registers)get_num_threads_physical
: with no OS/C stdlib dependency on x86 (all other arch need privileges to access specific registers)get_num_threads_os
: takes into account disabled cores (Virtual machines)get_num_threads_process
: Takes into accountcgroup
,schedaffinity
and taskset.Goals:
Unfortunately I don't think there is a way to detect more granular time quotas (in Docker/Kubernetes) as opposed to just restricting available CPUs.
See https://github.com/mratsim/constantine/blob/55785cdb65434933e3b7a5f822262201cb46ebf1/constantine/threadpool/primitives/topology.md
The text was updated successfully, but these errors were encountered: