Re: [PATCH 2/2] PF_DEAD: kill it

From: Ingo Molnar
Date: Fri Nov 25 2005 - 00:28:36 EST



* Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> After the previous change (->flags & PF_DEAD) <=> (->state ==
> EXIT_DEAD), so we can forget about PF_DEAD flag.
>
> In my opinion PF_DEAD has nothing to do with process state, it is just
> indication that task_struct should be freed after the last schedule.
>
> Perhaps it makes sense to add new TASK_DEAD flag to use it instead of
> EXIT_DEAD, while the latter should live only in ->exit_state.

yes, i'd suggest a followup patch to keep the two flag spaces totally
disjunct - at least for testing in -mm. This area of code (when it was
introduced) was pretty fragile and blew up under PREEMPT+SMP a couple of
times. The separate handling of PF_DEAD was necessary until i fixed
do_exit() to only have PF_DEAD in an atomic path up to the final
schedule(). You are right that we can totally eliminate it now.

so your patch looks great to me! (I have also added this patch (and the
previous patch) to the -rt tree, to give it some more testing in more
extreme preemption scenarios.)

Acked-by: Ingo Molnar <mingo@xxxxxxx>

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/