linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Corey Minyard <cminyard@mvista.com>
Subject: [PATCH] BUG_ON() in ksoftirqd is a bit too agressive...
Date: Wed, 18 May 2005 16:51:29 -0700	[thread overview]
Message-ID: <428BD501.5020905@mvista.com> (raw)

Ksoftirqd is created by init, long after the timer system is up and running.  We 
have hit the BUG_ON(tasklet_... in this code, i.e. tasklets pending at ksoftirqd 
create time.  Since, with the RT option to push all softirq code to a thread, 
any softirqs are defered to this time, it is easy to hit this bug.  Clearly only 
a problem for cpu 0.  Here is a patch:


Index: linux-2.6.10/kernel/softirq.c
===================================================================
--- linux-2.6.10.orig/kernel/softirq.c
+++ linux-2.6.10/kernel/softirq.c
@@ -514,8 +514,12 @@

  	switch (action) {
  	case CPU_UP_PREPARE:
-		BUG_ON(per_cpu(tasklet_vec, hotcpu).list);
-		BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list);
+		/* We may have tasklets already scheduled on
+		   processor 0, so don't check there. */
+		if (hotcpu != 0) {
+			BUG_ON(per_cpu(tasklet_vec, hotcpu).list);
+			BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list);
+		}
  		p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu);
  		if (IS_ERR(p)) {
  			printk("ksoftirqd for %i failed\n", hotcpu);
-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/

             reply	other threads:[~2005-05-18 23:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 23:51 George Anzinger [this message]
2005-05-23  7:28 ` [PATCH] BUG_ON() in ksoftirqd is a bit too agressive Ingo Molnar

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=428BD501.5020905@mvista.com \
    --to=george@mvista.com \
    --cc=cminyard@mvista.com \
    --cc=ganzinger@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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;
as well as URLs for NNTP newsgroup(s).