Netdev List
 help / color / mirror / Atom feed
From: Prakash Sangappa <prakash.sangappa@oracle.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"tj@kernel.org" <tj@kernel.org>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	Tom Hromatka <tom.hromatka@oracle.com>,
	Kamalesh Babulal <kamalesh.babulal@oracle.com>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [RFC PATCH 0/1] netlink: Netlink process event for cgroup migration
Date: Thu, 9 Apr 2026 03:44:26 +0000	[thread overview]
Message-ID: <F480D58D-B0B0-4AFD-891E-206D9B38466D@oracle.com> (raw)
In-Reply-To: <pd3vkzvgr233tkuocyvpgxc4kttsi5nlggcxuskvwi3mocoqkm@cfefi6hh74s6>

Hi Michal,

Thanks for look into this patch proposal.


> On Apr 8, 2026, at 5:54 AM, Michal Koutný <mkoutny@suse.com> wrote:
> 
> Hi Prakash.
> 
> On Tue, Apr 07, 2026 at 05:23:38PM +0000, Prakash Sangappa <prakash.sangappa@oracle.com> 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).

Will take a look.

> 
>> 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.
> The hook(s) proposed above are IMO more future proof and robust approach
> to the process migration that comes as a surprise (and possibly
> interferes with intended resource management).

Ok, with [1] would there be bpf hooks that can be used for notification
of cgroup migration events?  Will take a look.

Thanks,
-Prakash

> 
> Thanks,
> Michal
> 
> [1] https://lore.kernel.org/all/20260220-work-bpf-namespace-v1-2-866207db7b83@kernel.org/


  reply	other threads:[~2026-04-09  3:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 17:23 [RFC PATCH 0/1] netlink: Netlink process event for cgroup migration Prakash Sangappa
2026-04-07 17:23 ` [RFC PATCH 1/1] netlink: Add " Prakash Sangappa
2026-04-08 12:54 ` [RFC PATCH 0/1] netlink: " Michal Koutný
2026-04-09  3:44   ` Prakash Sangappa [this message]
2026-04-09 12:28   ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F480D58D-B0B0-4AFD-891E-206D9B38466D@oracle.com \
    --to=prakash.sangappa@oracle.com \
    --cc=brauner@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamalesh.babulal@oracle.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=netdev@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=tom.hromatka@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox