Re: Q: css_task_iter_advance() && dying_tasks

From: Tejun Heo
Date: Mon Jun 10 2024 - 16:02:52 EST


On Mon, Jun 10, 2024 at 01:08:52PM +0200, Oleg Nesterov wrote:
> Sorry for the spam, forgot to mention. Either way the usage of group_dead
> or atomic_read(signal->live) in these paths doesn't look "perfect", but
> this is another thing. The pseudo code below tries to mimic the current
> logic but again, I'm afraid I misread this code completely.

The usage of signal->live there is something I added without much thinking.
I just needed something which goes off after all sub-threads are gone.
Getting @group_dead from do_exit() sounds perfectly fine to me.

Thanks.

--
tejun