proj/portage:master commit in: man/, /

"Matt Turner" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786149767.adfcb02e4b88d32ddaec3ac192318d9039786d06.mattst88@gentoo>
commit:     adfcb02e4b88d32ddaec3ac192318d9039786d06
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  8 00:42:00 2026 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Aug  8 00:42:47 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=adfcb02e

Document FEATURES="cgroup"

Add make.conf.5 entries for the feature and PORTAGE_CGROUP_ROOT, and add
a NEWS entry.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 NEWS            |  6 ++++++
 man/make.conf.5 | 15 +++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/NEWS b/NEWS
index 2c6816577..5dd267dfa 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,12 @@ Breaking changes:
 
 Features:
 
+* Add FEATURES="cgroup" to account each source build's CPU time, peak memory,
+  and I/O in a per-build cgroup v2. No limits are imposed. Totals are written
+  to the build log and, with FEATURES="observability", included in the live
+  status snapshot. Configurable via PORTAGE_CGROUP_ROOT (default
+  /sys/fs/cgroup/portage); requires root and cgroup v2.
+
 * vartree: Avoid pruning preserved-libs database or syncing to disk if we
   installed no files.
 

diff --git a/man/make.conf.5 b/man/make.conf.5
index 40e5976f2..697231bfc 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -448,6 +448,14 @@ like "File not recognized: File truncated"), try recompiling the application
 with ccache disabled before reporting a bug. Unless you are doing development
 work, do not enable ccache.
 .TP
+.B cgroup
+Place each source build's process tree in its own cgroup v2 under
+\fIPORTAGE_CGROUP_ROOT\fR (default \fI/sys/fs/cgroup/portage\fR), so the kernel
+accounts the build's CPU time, peak memory, and I/O. The totals are reported in
+the build log and, with FEATURES="observability", in the live status snapshot.
+No limits are imposed. Requires root and a cgroup v2 unified hierarchy;
+degrades silently otherwise.
+.TP
 .B clean\-logs
 Enable automatic execution of the command specified by the
 PORTAGE_LOGDIR_CLEAN variable. The default PORTAGE_LOGDIR_CLEAN setting will
@@ -1137,6 +1145,13 @@ for bzip2 compression operations. \fBPORTAGE_BZIP2_COMMAND\fR will also be
 called for extraction operation, with -d appended, unless the
 \fBPORTAGE_BUNZIP2_COMMAND\fR variable is set.
 .TP
+\fBPORTAGE_CGROUP_ROOT\fR = \fI[path]\fR
+Base cgroup v2 directory under which FEATURES="cgroup" creates one leaf cgroup
+per source build. Defaults to \fI/sys/fs/cgroup/portage\fR, or to a
+\fIportage\fR subdirectory of the cgroup emerge itself runs in when that cgroup
+has been delegated every controller needed, as with a systemd service started
+with \fIDelegate=yes\fR.
+.TP
 \fBPORTAGE_CHECKSUM_FILTER\fR = \fI[space delimited list of hash names]\fR
 This variable may be used to filter the hash functions that are used to
 verify integrity of files. Hash function names are case\-insensitive, and
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.