From: Andrew Morton <akpm@digeo.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Robert Love <rml@tech9.net>, Steven Cole <elenstev@mesatop.com>,
torvalds@transmeta.com, linux-kernel@vger.kernel.org,
Steven Cole <scole@lanl.gov>
Subject: Re: [PATCH] kernel BUG at sched.c:944! only with CONFIG_PREEMPT=y]
Date: Thu, 12 Sep 2002 14:08:19 -0700 [thread overview]
Message-ID: <3D810243.E2E6640E@digeo.com> (raw)
In-Reply-To: Pine.LNX.4.44.0209122242300.21936-100000@localhost.localdomain
Ingo Molnar wrote:
>
> On 12 Sep 2002, Robert Love wrote:
>
> > While this sounds like a great debugging check, it is not useful in
> > general since we surely have some bad code that calls schedule() with
> > locks held. Further, since the atomic accounting only includes locks if
> > CONFIG_PREEMPT is set, you only see this with kernel preemption enabled.
>
> it *is* a great debugging check, at zero added cost. Scheduling from an
> atomic region *is* a critical bug that can and will cause problems in 99%
> of the cases. Rather fix the asserts that got triggered instead of backing
> out useful debugging checks ...
>
The problem here is that some random piece of code has bumped
the preemption counter, and we've lost all trace of that at
the site where the problem is detected.
So... In do_initcalls() we'd need:
do {
(*call)();
+ if (in_atomic())
+ printk("initcall at %p is buggy\n", call);
call++;
} while (call < &__initcall_end);
and to diagnose this particular problem I guess we need to
add
if (in_atomic())
printk("goofed at %d\n", __LINE__);
to twenty or so places in start_kernel().
prev parent reply other threads:[~2002-09-12 21:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3D80EF3F.D82B9CB9@digeo.com>
[not found] ` <1031862049.2799.402.camel@spc9.esa.lanl.gov>
2002-09-12 20:35 ` [PATCH] kernel BUG at sched.c:944! only with CONFIG_PREEMPT=y] Robert Love
2002-09-12 20:44 ` Ingo Molnar
2002-09-12 20:45 ` Robert Love
2002-09-12 20:58 ` Steven Cole
2002-09-13 7:19 ` Ingo Molnar
2002-09-13 7:36 ` Robert Love
2002-09-13 7:40 ` Robert Love
2002-09-13 11:56 ` Thunder from the hill
2002-09-12 21:08 ` Andrew Morton [this message]
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=3D810243.E2E6640E@digeo.com \
--to=akpm@digeo.com \
--cc=elenstev@mesatop.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rml@tech9.net \
--cc=scole@lanl.gov \
--cc=torvalds@transmeta.com \
/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