[lkml]   [2000]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [prepatch] 2.4 waitqueues
On Wed, Dec 27, 2000 at 01:57:12PM +1100, Andrew Morton wrote:
> Oh, it's all still there, but it's now all in the header file:
> #ifdef DEBUG
> #define foo() printk(stuff)
> #else
> #define foo()
> #endif

I intentionally didn't focused on such part of your patch because I understood
from the description that debugging stuff was gone and I wasn't going to agree
with such part regardless of the implementation it was really the case ;).

Now reading such part of the patch it looks a fine cleanup of course.

> No, gcc doesn't give any warnings about uninitialised vars. It _could_
> give warnings about unused ones, but doesn't.

So then you're wasting stack in UP compile.

Not a big deal but still I'd prefer the CONFIG_SMP #ifdef though, it looks even
more obvious that it's a compile check and at least in your usage I cannot see
a relevant readability advantage. And my own feeling is not having to rely on
more things to produce the wanted asm when there's no relevant advantage, but
if Linus likes it I won't object further.

> It's not just open-coded printks - it's oopses. If you take an oops or a
> BUG or a panic within wake_up() or _anywhere_ with the runqueue_lock held,
> the machine deadlocks and you don't get any diagnostics. This is bad.
> We really do need to get that wake_up() out of printk(). tq_timer may
> not be the best way. Suggestions welcome.

For kernel autodiagnostics we need to trust something. This something is
everything that gets into the oops path. wake_up is one of those things. You
want to replace wake_up with queue_task, why shouldn't queue_task break instead
of wake_up? You're replacing a thing with another thing that can of course
break too if there's a bug (hardware or software). But they're so core things
that we need to trust anyway and we need to get them right from sources without
relying on any testing anyways. So I simply don't see any advantage of using
queue_task other than making things slower and more complex. Debugging hardware
bugs isn't a good point either. Of course I see why you were doing that during
developement, and that's fine for local debugging ;)

For the runqueue_lock right way to not having to trust schedule as well is to
add it to the bust_spinlocks list.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.224 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site