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

On 16 Sep 2002, Robert Love wrote:
> I liked this idea, and was working on implementing it when I ran into a
> few roadblocks. Your ideas are welcome.
> First, "preempt_count()" is used as an l-value in a lot of places, i.e.
> look at all the "preempt_count() += foo" in the IRQ code. We cannot
> mask things out of it.

Ok. Let's just make the masking explicit in in_atomic() then, like you

> Simplest solution is to:
> #define in_atomic() \
> (preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
> although I still dislike the masking just to make the schedule()
> code-path cleaner.

I don't think this is a scheduler cleanliness issue: it's a consistency
issue. If "in_interrupt()" and friends do not care about PREEMPT_ACTIVE,
then neither should "in_atomic()". The fact that the scheduler test gets
cleaned up is secondary - although it is obviously a result of being

> Oh, and there is another problem: printk() from schedule() implicitly
> calls wake_up(). My machine dies even with just a printk() and not a
> BUG()... I suspect there may be some SMP issue in that whole mess too,
> because setting oops_in_progress prior did not help.

Hmm.. It will call wake_up() because it will try to wake up any klogd.
What's the problem? Calling wake_up() should be fine from there..


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.156 / U:6.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site