[PATCH pm-freezer 2/4] freezer: set PF_NOFREEZE on a dying task right before TASK_DEAD
oleg at redhat.com
Mon Aug 29 11:02:48 PDT 2011
On 08/29, Tejun Heo wrote:
> There's no try_to_freeze() call in the exit path and the only
> necessary guarantee is that freezer doesn't hang waiting for zombies.
> Set PF_NOFREEZE right before setting tsk->state to TASK_DEAD instead.
But I'd like to repeat, this looks "asymmetrical". do_each_thread()
can't see the (auto)reaped tasks after they do exit_notify(). So we
can only see this PF_NOFREEZE if the thread becomes a zombie.
> @@ -1044,6 +1038,10 @@ NORET_TYPE void do_exit(long code)
> + /* this task is now dead and freezer should ignore it */
> + current->flags |= PF_NOFREEZE;
> /* causes final put_task_struct in finish_task_switch(). */
> tsk->state = TASK_DEAD;
May be freezing_slow_path() can check TASK_DEAD along with PF_NOFREEZE
instead? (or tsk->exit_state != 0 to avoid the asymmetry above). Just
to keep this logic in the freezer code. I dunno.
But this all is up to you and Rafael, I am not arguing. Just random
More information about the Containers