mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* CLONE_INTO_CGROUP probably needs to call controller attach handlers
@ 2023-03-28 15:39 Christian Brauner
  2023-03-28 15:41 ` Christian Brauner
  2023-03-29  1:30 ` Waiman Long
  0 siblings, 2 replies; 8+ messages in thread
From: Christian Brauner @ 2023-03-28 15:39 UTC (permalink / raw)
  To: Tejun Heo, Johannes Weiner; +Cc: Zefan Li, cgroups, linux-kernel, gscrivan

Hey,

Giuseppe reported that the the affinity mask isn't updated when a
process is spawned directly into the target cgroup via
CLONE_INTO_CGROUP. However, migrating a process will cause the affinity
mask to be updated (see the repro at [1].

I took a quick look and the issue seems to be that we don't call the
various attach handlers during CLONE_INTO_CGROUP whereas we do for
migration. So the solution seems to roughly be that we need to call the
various attach handlers during CLONE_INTO_CGROUP as well when the
parent's cgroups is different from the child cgroup. I think we need to
call all of them, can, cancel and attach.

The plumbing here might be a bit intricate since the arguments that the
fork handlers take are different from the attach handlers.

Christian

[1]: https://paste.centos.org/view/f434fa1a



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-31 18:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 15:39 CLONE_INTO_CGROUP probably needs to call controller attach handlers Christian Brauner
2023-03-28 15:41 ` Christian Brauner
2023-03-29  1:30 ` Waiman Long
2023-03-29  2:48   ` Waiman Long
2023-03-29  7:19     ` Christian Brauner
2023-03-31 18:27       ` Waiman Long
2023-03-29 14:52     ` Johannes Weiner
2023-03-29 17:43       ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®