From: Manfred Spraul <manfred@colorfullife.com>
To: linux-kernel@vger.kernel.org
Subject: migh_sleep during early boot
Date: Sun, 19 Oct 2003 01:01:25 +0200 [thread overview]
Message-ID: <3F91C645.6060906@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
Hi,
With might_sleep reports several calls from invalid contexts during
early boot:
First some calls due to irq off, preempt off: This are the first stages
of start_kernel, irqs are not yet enabled.
Then calls with only preemption off: The kernel runs on the future idle
thread, and these threads have preempt_count==1.
Attached is a patch that fixes the latter bug: ignore the preemption
counter for the idle threads. I haven't figured out how to identify the
calls before the first local_irq_enable().
--
Manfred
[-- Attachment #2: patch-might_sleep_2 --]
[-- Type: text/plain, Size: 421 bytes --]
--- 2.6/kernel/sched.c 2003-10-18 21:17:11.000000000 +0200
+++ build-2.6/kernel/sched.c 2003-10-19 00:49:03.000000000 +0200
@@ -2848,7 +2848,7 @@
#if defined(in_atomic)
static unsigned long prev_jiffy; /* ratelimiting */
- if (in_atomic() || irqs_disabled()) {
+ if ((in_atomic() && current->pid) || irqs_disabled()) {
if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
return;
prev_jiffy = jiffies;
reply other threads:[~2003-10-18 23:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3F91C645.6060906@colorfullife.com \
--to=manfred@colorfullife.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.