[lkml]   [2003]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: doublefault debugging (was Re: Linux v2.5.62 --- spontaneous reboots)

On Thu, 20 Feb 2003, Linus Torvalds wrote:
> In other words, I think we need to have schedule_tail() do the
> release_task(), otherwise we'd release it too early while the task
> structure (and the stack) are both still in use.

Well, it's not "schedule_tail()" any more, since that is no longer called
by the normal schedule end-path.

Test suggestion:

- remove the

if (tsk->exit_signal == -1)

from kernel/exit.c

- make "finish_switch()" something like

static void inline finish_switch(struct runqueue *rq, struct task_struct *prev)
finish_arch_switch(rp, prev);
if ((prev->state & TASK_ZOMBIE) && (prev->exit_signal == -1))

- make all of "kernel/sched.c" use "finish_switch()" instead of
"finish_arch_switch()" (ie replace it in both schedule_tail() and the
end of schedule() itself).

At some point we can think about trying to speed up that test for
release_task(), ie add some extra task-state or something that is set in
kernel/exit.c so that we don't slow down the task switching unnecessarily.

How does this sound?

Also, for debugging, how about this simple (but expensive) debugging thing
that only works without HIGHMEM (and is obviously whitespace-damaged due
to indenting it):

--- 1.148/mm/page_alloc.c Wed Feb 5 20:05:13 2003
+++ edited/mm/page_alloc.c Thu Feb 20 10:22:42 2003
@@ -685,6 +685,7 @@
void __free_pages(struct page *page, unsigned int order)
if (!PageReserved(page) && put_page_testzero(page)) {
+ memset(page_address(page), 0x01, PAGE_SIZE << order);
if (order == 0)

which should show the effects of a buggy "release_task()" much more



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:33    [W:0.082 / U:5.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site