]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Introduce cgroup_lifetime_notifier
authorTejun Heo <tj@kernel.org>
Wed, 14 May 2025 04:44:44 +0000 (00:44 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 22 May 2025 19:20:11 +0000 (09:20 -1000)
commit9e8c67a9e526f497d606d721cf6b92dd68d90806
tree238ec903181e036e1540140fb34dd53630a73444
parentcd22cbad1b800e55f5bd38c58be16f9d0b171d9a
sched_ext: Introduce cgroup_lifetime_notifier

Other subsystems may make use of the cgroup hierarchy with the cgroup_bpf
support being one such example. For such a feature, it's useful to be able
to hook into cgroup creation and destruction paths to perform
feature-specific initializations and cleanups.

Add cgroup_lifetime_notifier which generates CGROUP_LIFETIME_ONLINE and
CGROUP_LIFETIME_OFFLINE events whenever cgroups are created and destroyed,
respectively.

The next patch will convert cgroup_bpf to use the new notifier and other
uses are planned.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c