[RFC PATCH 0/1] netlink: Netlink process event for cgroup migration

From: Prakash Sangappa

Date: Tue Apr 07 2026 - 13:24:23 EST


With cgroup based resource management, it becomes useful for
userspace to be notified when a task changes cgroup membership.
Unexpected migrations can lead to incorrect resource accounting
and enforcement resulting in undesirable behavior or failures.
Applications/userspace have to poll /proc to detect changes to
cgroup membership, which is inefficient when dealing with a large
number of tasks.

Add a new netlink proc connector event that gets generated when
a task migrates between cgroups. This allows applications/tools
to monitor cgroup membership changes without periodic polling.

The netlink proc event will include task's pid/tgid, initiator
process pid/tgid and the cgroup id.

Prakash Sangappa (1):
netlink: Add Netlink process event for cgroup migration

drivers/connector/cn_proc.c | 28 ++++++++++++++++++++++++++++
include/linux/cn_proc.h | 3 +++
include/uapi/linux/cn_proc.h | 14 ++++++++++++--
kernel/cgroup/cgroup-v1.c | 7 ++++++-
kernel/cgroup/cgroup.c | 5 ++++-
5 files changed, 53 insertions(+), 4 deletions(-)

--
2.43.7