android_kernel_sony_sdm845/kernel/cgroup
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tejun Heo c782c1f3ec BACKPORT: cgroup: use cgrp->kn->id as the cgroup ID
cgroup ID is currently allocated using a dedicated per-hierarchy idr
and used internally and exposed through tracepoints and bpf.  This is
confusing because there are tracepoints and other interfaces which use
the cgroupfs ino as IDs.

The preceding changes made kn->id exposed as ino as 64bit ino on
supported archs or ino+gen (low 32bits as ino, high gen).  There's no
reason for cgroup to use different IDs.  The kernfs IDs are unique and
userland can easily discover them and map them back to paths using
standard file operations.

This patch replaces cgroup IDs with kernfs IDs.

* cgroup_id() is added and all cgroup ID users are converted to use it.

* kernfs_node creation is moved to earlier during cgroup init so that
  cgroup_id() is available during init.

* While at it, s/cgroup/cgrp/ in psi helpers for consistency.

* Fallback ID value is changed to 1 to be consistent with root cgroup
  ID.

Change-Id: Iab2ee05e4e75671c3ee6799e7e2b3358394fec66
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 18:02:34 +07:00
..
cgroup-internal.h BACKPORT: cgroup/tracing: Move taking of spin lock out of trace event handlers 2026-05-15 18:02:33 +07:00
cgroup-v1.c BACKPORT: cgroup/tracing: Move taking of spin lock out of trace event handlers 2026-05-15 18:02:33 +07:00
cgroup.c BACKPORT: cgroup: use cgrp->kn->id as the cgroup ID 2026-05-15 18:02:34 +07:00
cpuset.c cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() 2026-05-15 17:50:42 +07:00
debug.c cgroup: update debug controller to print out thread mode information 2026-05-15 17:50:37 +07:00
freezer.c UPSTREAM: cgroup: add tracing points for cgroup v2 freezer 2026-05-15 18:02:33 +07:00
legacy_freezer.c BACKPORT: cgroup: rename freezer.c into legacy_freezer.c 2026-05-15 17:50:46 +07:00
Makefile BACKPORT: cgroup: cgroup v2 freezer 2026-05-15 17:50:46 +07:00
namespace.c kernel: convert cgroup_namespace.count from atomic_t to refcount_t 2026-05-15 17:50:33 +07:00
pids.c BACKPORT: treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 451 2026-05-15 17:57:56 +07:00
rdma.c cgroup: Fixed rdmacg uninitialized current resource usage 2026-05-15 17:50:32 +07:00