Re: doublefault debugging (was Re: Linux v2.5.62 --- spontaneous reboots)

John Levon (levon@movementarian.org)
Thu, 20 Feb 2003 22:57:52 +0000


On Thu, Feb 20, 2003 at 02:32:02PM -0800, Linus Torvalds wrote:

> I think the _real_ simplification is to just have the task switch do this
> in the tail:
>
> if (prev->state & TASK_DEAD)
> put_task_struct(prev);
>
> suddenly we don't have any issues at all with possibly freeing stuff
> before its time, since we're guaranteed to keep the process around untill
> we've properly scheduled out of it.

Side note ... if there's a sleepable context in which oprofile can
synchronise its buffers (i.e. after the task can possible run on a CPU
again, and before the task_struct itself is freed/reused), that would be
very handy.

Currently we're masking out any samples when PF_EXITING is set for
current(), which is obviously less than ideal.

Would this be such a spot ? Basically somewhere that profile_exit_task
can sit.

regards
john

-
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/