lkml.org 
[lkml]   [2005]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] PF_DEAD: cleanup usage


On Fri, 25 Nov 2005, Ingo Molnar wrote:
> >
> > I think it is better to set EXIT_DEAD in do_exit(), along with PF_DEAD
> > flag.
>
> nice idea - your patch looks good to me.

I'm not entirely convinced.

The thing is, We used to have DEAD in the task state flags, ie TASK_ZOMBIE
was it.

We started using PF_DEAD in 2003 with this commit message:

Author: Linus Torvalds <torvalds@home.osdl.org> 2003-10-26 03:16:23

Add a sticky "PF_DEAD" task flag to keep track of dead processes.

Use this to simplify 'finish_task_switch', but perhaps more
importantly we can use this to track down why some processes
seem to sometimes not die properly even after having been
marked as ZOMBIE. The "task->state" flags are too fluid to
allow that well.

ie the PF_DEAD flag was never really about is _needing_ it: it was all
about being able to safely check it _without_ having to rely on
task->state.

So putting it back into task->state is not wrong per se, but it kind of
misses the point of why it was somewhere else in the first place (or
rather, why it was there in the _second_ place, since it was in
task->state in the first place and got moved out of there).

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.061 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site