Hi. This case of dead group leaders and running siblings -- SIGCHILD is delivered to the parent only when the last thread of the threadgroup terminates. On Thu, May 30, 2019 at 11:37:00AM -0700, Tejun Heo <tj@xxxxxxxxxx> wrote: > @@ -6009,6 +6031,7 @@ void cgroup_exit(struct task_struct *tsk > if (!list_empty(&tsk->cg_list)) { > spin_lock_irq(&css_set_lock); > css_set_move_task(tsk, cset, NULL, false); > + list_add_tail(&tsk->cg_list, &cset->dying_tasks); > cset->nr_tasks--; > > WARN_ON_ONCE(cgroup_task_frozen(tsk)); > @@ -6034,6 +6057,13 @@ void cgroup_release(struct task_struct * > do_each_subsys_mask(ss, ssid, have_release_callback) { > ss->release(task); > } while_each_subsys_mask(); > + > + if (use_task_css_set_links) { > + spin_lock_irq(&css_set_lock); > + css_set_skip_task_iters(task_css_set(task), task); > + list_del_init(&task->cg_list); > + spin_unlock_irq(&css_set_lock); > + } > } Wouldn't it make more sense to call css_set_move_task(tsk, cset, NULL, false); in cgroup_release instead of cgroup_exit then? css_set_move_task triggers the cgroup emptiness notification so if we list group leaders with running siblings as members of the cgroup (IMO correct), is it consistent to deliver the (un)populated event that early? By moving to cgroup_release we would also make this notification analogous to SIGCHLD delivery. Michal