From: Pádraig Brady Date: Tue, 19 Aug 2025 15:49:22 +0000 (+0100) Subject: nproc: honor cgroup v2 CPU quotas X-Git-Tag: v9.8~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4df55be7f78d29415abd7765f863ff38184f86e;p=thirdparty%2Fcoreutils.git nproc: honor cgroup v2 CPU quotas * NEWS: Mention the new feature. * doc/coreutils.texi (nproc invocation): Mention that cgroup CPU quotas can limit the reported number. * gnulib: Update to new nproc gnulib implementation: https://github.com/coreutils/gnulib/commit/9b07115f4a --- diff --git a/NEWS b/NEWS index d0bd06d4ad..5724698bfd 100644 --- a/NEWS +++ b/NEWS @@ -75,15 +75,18 @@ GNU coreutils NEWS -*- outline -*- basenc supports the --base58 option to encode and decode the visually unambiguous Base58 encoding. + 'date' now outputs dates in the country's native calendar for the + Iranian locale (fa_IR) and for the Ethiopian locale (am_ET), and also + does so more consistently for the Thailand locale (th_TH.UTF-8). + + nproc now honors any cgroup v2 configured CPU quotas, + which may reduce the effective number of processors available. + stty supports setting arbitrary baud rates on supported systems, like Hurd, Linux with glibc >= 2.42, and some BSDs. Also on other systems the full set of supported baud rates is determined at build time if possible. - 'date' now outputs dates in the country's native calendar for the - Iranian locale (fa_IR) and for the Ethiopian locale (am_ET), and also - does so more consistently for the Thailand locale (th_TH.UTF-8). - ** Changes to conform better to POSIX.1-2024 readlink now defaults to being verbose if the POSIXLY_CORRECT diff --git a/doc/coreutils.texi b/doc/coreutils.texi index c4dd2f60dd..c874ffc61c 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -17421,8 +17421,9 @@ which may be less than the number of online processors. If this information is not accessible, then print the number of processors installed. If the @env{OMP_NUM_THREADS} or @env{OMP_THREAD_LIMIT} environment variables are set, then they will determine the minimum -and maximum returned value respectively. The result is guaranteed to be -greater than zero. Synopsis: +and maximum returned value respectively. Linux Cgroups version 2 +CPU quotas may also limit the maximum returned value. +The result is guaranteed to be greater than zero. Synopsis: @example nproc [@var{option}] @@ -17436,8 +17437,8 @@ The program accepts the following options. Also see @ref{Common options}. @opindex --all Print the number of installed processors on the system, which may be greater than the number online or available to the current process. -The @env{OMP_NUM_THREADS} or @env{OMP_THREAD_LIMIT} environment variables -are not honored in this case. +The @env{OMP_NUM_THREADS} or @env{OMP_THREAD_LIMIT} environment variables, +or Cgroup CPU quotas, are not honored in this case. @item --ignore=@var{number} @opindex --ignore diff --git a/gnulib b/gnulib index 948ba80168..9b07115f4a 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 948ba80168293e3d8a905eeffb0ab61424c4c374 +Subproject commit 9b07115f4a344effef1dde8bd0e6e356d4b0e744