All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.5.8: Preempt problems
@ 2002-04-17 10:43 Russell King
  2002-04-17 10:50 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2002-04-17 10:43 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-17 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-17 10:43 2.5.8: Preempt problems Russell King
2002-04-17 10:50 ` Russell King

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.