lkml.org 
[lkml]   [2002]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 4/4] increase traffic on linux-kernel
Date
In article <3D928864.23666D93@digeo.com>,
Andrew Morton <akpm@digeo.com> wrote:
>
>Infrastructure to detect sleep-inside-spinlock bugs. Really only
>useful if compiled with CONFIG_PREEMPT=y. It prints out a whiny
>message and a stack backtrace if someone calls a function which might
>sleep from within an atomic region.

This is in my BK tree now, along with Ingo's symbolic backtraces, which
makes it possibly less tedious to read the output.

I would suggest that all developers for a while run with

CONFIG_PREEMPT=y
CONFIG_DEBUG_KERNEL=y
CONFIG_KALLSYMS=y

and see if something shows up in their subsystem (but be careful about
the backtraces, since they often contain old crud, especially since gcc
does a horrible job at keeping the stack together and thus leaves unused
"holes" in the stack frame which then show old and stale info).

It shows clearly that at least the sound PCM code does locking
completely the wrong way around, apparently at least partly because of
bad abstraction macros that hide the fact that some locks are semaphores
and others are spinlocks.

[ Rant: abstraction like this is _bad_, for christ sake! Don't hide what
locks you're using just to make the code look simpler. Hint: trying
to do a "down()" within a spinlock is stupid and not produtive. ]

Thanks,

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

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