All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "K.R. Foley" <kr@cybsft.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, Lee Revell <rlrevell@joe-job.com>,
	John Rigg <lk@sound-man.co.uk>
Subject: Re: 2.6.15-rc5-rt4: BUG: swapper:0 task might have lost a preemption check!
Date: Fri, 23 Dec 2005 10:37:57 -0500	[thread overview]
Message-ID: <1135352277.6652.2.camel@localhost.localdomain> (raw)
In-Reply-To: <43AB6B89.8020409@cybsft.com>

On Thu, 2005-12-22 at 21:14 -0600, K.R. Foley wrote:
> Lee Revell wrote:
> > Got this on boot.  Same .config as the last one I sent you.
> > 
> > VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
> >     ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:pio
> > Probing IDE interface ide1...
> > BUG: swapper:0 task might have lost a preemption check!
> >  [<c010440c>] dump_stack+0x1c/0x20 (20)
> >  [<c01166aa>] preempt_enable_no_resched+0x5a/0x60 (20)
> >  [<c0100dd9>] cpu_idle+0x79/0xb0 (12)
> >  [<c0100280>] _stext+0x40/0x50 (28)
> >  [<c03078e6>] start_kernel+0x176/0x1d0 (20)
> >  [<c0100199>] 0xc0100199 (1086889999)
> > ---------------------------
> > | preempt count: 00000000 ]
> > | 0-level deep critical section nesting:
> > ----------------------------------------
> > 
> > 


OK, I just found an SMP bug, and here's the patch.  Maybe this will help
you kr.  I'm currently running x86_64 SMP with 2.6.15-rc5-rt4 with this
and my softirq-no-hrtimers patch I sent earlier.

-- Steve

Index: linux-2.6.15-rc5-rt4/kernel/workqueue.c
===================================================================
--- linux-2.6.15-rc5-rt4.orig/kernel/workqueue.c	2005-12-23 10:23:25.000000000 -0500
+++ linux-2.6.15-rc5-rt4/kernel/workqueue.c	2005-12-23 10:25:21.000000000 -0500
@@ -370,10 +370,17 @@
 void set_workqueue_thread_prio(struct workqueue_struct *wq, int cpu,
 				int policy, int rt_priority, int nice)
 {
-	struct task_struct *p = wq->cpu_wq[cpu].thread;
+	struct cpu_workqueue_struct *cwq;
+	struct task_struct *p;
 	struct sched_param param = { .sched_priority = rt_priority };
+	unsigned long flags;
 	int ret;
 
+	cwq = per_cpu_ptr(wq->cpu_wq, cpu);
+	spin_lock_irqsave(&cwq->lock, flags);
+	p = cwq->thread;
+	spin_unlock_irqrestore(&cwq->lock, flags);
+
 	set_user_nice(p, nice);
 	ret = sys_sched_setscheduler(p->pid, policy, &param);
 	if (ret)



  reply	other threads:[~2005-12-23 15:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-23  2:55 2.6.15-rc5-rt4: BUG: swapper:0 task might have lost a preemption check! Lee Revell
2005-12-23  3:14 ` K.R. Foley
2005-12-23 15:37   ` Steven Rostedt [this message]
2005-12-23 16:29     ` K.R. Foley
2005-12-23 18:37       ` Lee Revell
2005-12-23 18:45       ` Steven Rostedt
2005-12-23 18:51         ` K.R. Foley
2005-12-23 17:47     ` John Rigg
2005-12-23 20:38       ` Steven Rostedt
2005-12-23 21:19         ` John Rigg

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=1135352277.6652.2.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=kr@cybsft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@sound-man.co.uk \
    --cc=mingo@elte.hu \
    --cc=rlrevell@joe-job.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 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.