From 909bb14da30291e07ba77ec7fdb5b9f215d6246d Mon Sep 17 00:00:00 2001 From: Maria Mozgunova Date: Mon, 25 Jul 2022 20:19:52 +0300 Subject: [PATCH] Add cgroup2 support --- reference/tools.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reference/tools.rst b/reference/tools.rst index bf9a8c7c6278..034ef6174007 100644 --- a/reference/tools.rst +++ b/reference/tools.rst @@ -28,9 +28,11 @@ tools.cpu_count() def tools.cpu_count() -Returns the number of CPUs available, for parallel builds. If processor detection is not enabled, it will safely return 1. When -running in Docker, it reads cgroup to detect the configured number of CPUs. It Can be overwritten with the environment variable -:ref:`env_vars_conan_cpu_count` and configured in the :ref:`conan_conf`. +Returns the number of CPUs available, for parallel builds. If processor detection is not enabled, it will safely return 1. +When running in Docker, it reads cgroup to detect the configured number of CPUs. +In the case of cgroupv2 the number of CPUs is determined based on `/sys/fs/cgroup/cpu.max` file. +When no limit is set, all CPUs detected by the processor are used. The number of CPUs available can be overwritten with +the environment variable :ref:`env_vars_conan_cpu_count` and configured in the :ref:`conan_conf`. .. _tools_vcvars_command: