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

From: Christian Brauner

Date: Thu Apr 09 2026 - 08:29:11 EST


On Wed, Apr 08, 2026 at 02:54:17PM +0200, Michal Koutný wrote:
> Hi Prakash.
>
> On Tue, Apr 07, 2026 at 05:23:38PM +0000, Prakash Sangappa <prakash.sangappa@xxxxxxxxxx> wrote:
> > 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.
>
> You may want to check [1] (and followup discussion).
>
> > 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.
>
> This CN_IDX_PROC netlink API haunts me at night.

Yeah, let's not go down that route...