public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: [patch 4/4] increase traffic on linux-kernel
Date: Fri, 27 Sep 2002 01:31:17 +0000 (UTC)	[thread overview]
Message-ID: <an0cd5$262$1@penguin.transmeta.com> (raw)
In-Reply-To: 3D928864.23666D93@digeo.com

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

  parent reply	other threads:[~2002-09-27  1:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-26  4:09 [patch 4/4] increase traffic on linux-kernel Andrew Morton
2002-09-26  4:26 ` Jeff Garzik
2002-09-26  4:31   ` Andrew Morton
2002-09-26  4:35     ` Jeff Garzik
2002-09-26  4:32   ` Andrew Morton
2002-09-26  4:32 ` Greg KH
2002-09-26  4:37   ` Andrew Morton
2002-09-27  1:31 ` Linus Torvalds [this message]
2002-09-27  1:34   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='an0cd5$262$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox