From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Subject: 2.5.8: Preempt problems
Date: Wed, 17 Apr 2002 11:43:31 +0100 [thread overview]
Message-ID: <20020417114331.D2386@flint.arm.linux.org.uk> (raw)
Hi,
I'm trying to debug a flood of:
error: sh[81] exited with preempt_count 1
messages on ARM with kernel 2.5.8, and its looking like a generic kernel
bug is causing it.
The point at which preempt_count gets set to '1' for each task is at the
lock_kernel() in start_kernel(). Why?
We start booting the kernel. One of the very first things we do is call
lock_kernel(), which increments the preempt_count for PID0. We initialise
stuff, and then clone the thread for PID1, init.
When we clone a thread, dup_task_struct() creates a new kernel stack and
thread_info structure. The childs thread_info structure inherits from
the parent, which includes the preempt_count of 1.
We start the user space init(8) program, and run various other programs,
forking as we do. Each time we fork(), we call dup_task_struct() which
causes each task to inherit the non-zero preempt_count.
Thus, we never reach a preempt_count of 0, and never actually preempt.
Comments? Is there some fiddle in the x86 code somewhere that we've
missed in the ARM tree to get this to work?
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next reply other threads:[~2002-04-17 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-17 10:43 Russell King [this message]
2002-04-17 10:50 ` Russell King
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=20020417114331.D2386@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--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
all inboxes | Powered by JetHome®