[lkml]   [2002]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] BUG(): sched.c: Line 944

On Tue, 17 Sep 2002, Linus Torvalds wrote:
> I really think we need this to have a stable system. Alan still thinks
> preempt is unstable, and this helps counter some of that - by adding
> sanity checks that all the counters are doing the right thing.

That said, the exit() crap does end up being a bit unreadable. How about
just splitting up schedule() into the "normal schedule" and the "exit()"
case. In particular, there are a few other things that are illegal for
the non-exit case anyway, and that we migth as well check for. There are
also potentially things we might want to do in the exit case that we don't
want to do in the hot-path.

So we could just rename the current core "schedule()" functionality as
"static void do_schedule()", and then have

void schedule(void)
BUG_ON(current->state & TASK_ZOMBIE);

void exit_schedule(void)
BUG_ON(!(current->state & TASK_ZOMBIE));

which is simpler than playing games with preempt_count == -2, and also
allows us more sanity checking than we have right now (the TASK_ZOMBIE
thing is also a exit-specific thing, and there may well be others too).


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:28    [W:0.139 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site