Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 156165 Details for
Bug 242422
BUG: at kernel/softirq.c:639 __tasklet_action()
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
rostedt.patch
rostedt.patch (text/plain), 8.04 KB, created by
IBM Bug Proxy
on 2007-06-05 01:15:45 UTC
(
hide
)
Description:
rostedt.patch
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2007-06-05 01:15:45 UTC
Size:
8.04 KB
patch
obsolete
>From rostedt@goodmis.org Mon Jun 4 17:56:45 2007 >Return-Path: <tglx@linutronix.de> >Received: from imap.linux.ibm.com ([unix socket]) by imap.linux.ibm.com > (Cyrus v2.3.7-Invoca-RPM-2.3.7-7) with LMTPA; Mon, 04 Jun 2007 17:56:45 > -0400 >X-Sieve: CMU Sieve 2.3 >Received: by imap.linux.ibm.com (Postfix, from userid 101) id EB9091910153; > Mon, 4 Jun 2007 17:56:45 -0400 (EDT) >X-Spam-TestScore: none >X-Spam-TokenSummary: Bayes not run. >X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on > imap.linux.ibm.com >X-Spam-Level: >X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled > version=3.1.7 >X-Spam-Relay-Country: US ** US US US ** US US DE DE US US >Received: from smtp.linux.ibm.com (smtp.linux.ibm.com [9.26.4.197]) by > imap.linux.ibm.com (Postfix) with ESMTP id 891E9191013E for > <johnstul@imap.linux.ibm.com>; Mon, 4 Jun 2007 17:56:39 -0400 (EDT) >Received: from localhost (localhost.localdomain [127.0.0.1]) by > smtp.linux.ibm.com (Postfix) with ESMTP id 27EA8C03E for > <johnstul@linux.ibm.com>; Mon, 4 Jun 2007 17:56:39 -0400 (EDT) >X-Virus-Scanned: amavisd-new at linux.ibm.com >Received: from VMSDVMA.POK.IBM.COM (vmsdvma.pok.ibm.com [9.56.231.65]) by > smtp.linux.ibm.com (Postfix) with ESMTP id E96A8C040 for > <johnstul@linux.ibm.com>; Mon, 4 Jun 2007 17:56:38 -0400 (EDT) >Received: by VMSDVMA.POK.IBM.COM (IBM VM SMTP Level 520) via spool with > SMTP id 2456 ; Mon, 04 Jun 2007 17:55:03 EDT >Received: by vmsdvma.vnet.ibm.com (xagent2 5.8.6) via xagsmtp3 with spool > id 5678 for johnstul@linux.vnet.ibm.com; Mon, 04 Jun 2007 17:55:03 -0400 > (EDT) >Received: from d01relay03.pok.ibm.com [9.56.227.235] by VMSDVMA.POK.IBM.COM > (IBM VM SMTP Level 520) via TCP with ESMTP ; Mon, 04 Jun 2007 17:55:00 EDT >Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by > d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id > l54LuQAT257558 for <johnstul@us.ibm.com>; Mon, 4 Jun 2007 17:56:28 -0400 >Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by > d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l54LuQbF030438 > for <johnstul@us.ibm.com>; Mon, 4 Jun 2007 17:56:26 -0400 >Received: from d01as03.pok.ibm.com (d01as03 [9.56.224.40]) by > d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l54LuQpO030435 > (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for > <johnstul@us.ibm.com>; Mon, 4 Jun 2007 17:56:26 -0400 >Received: from e6.ny.us.ibm.com (e6.pok.ibm.com [9.56.232.146]) by > d01as03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l54LuOeq014708 > (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for > <johnstul@us.ibm.com>; Mon, 4 Jun 2007 17:56:25 -0400 >Received: from mail.tglx.de (www.osadl.org [213.239.205.134]) by > e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l54LvSPH023798 for > <johnstul@us.ibm.com>; Mon, 4 Jun 2007 17:57:28 -0400 >Received: from [127.0.0.1] (debian [213.239.205.147]) by mail.tglx.de > (Postfix) with ESMTP id D847665C065 for <johnstul@us.ibm.com>; Mon, 4 Jun > 2007 23:56:13 +0200 (CEST) >Received: from ms-smtp-05.nyroc.rr.com (ms-smtp-05.nyroc.rr.com > [24.24.2.59]) by mail.tglx.de (Postfix) with ESMTP id 89CE665C065 for > <tglx@linutronix.de>; Mon, 4 Jun 2007 23:01:02 +0200 (CEST) >Received: from [192.168.23.10] (cpe-24-94-51-176.stny.res.rr.com > [24.94.51.176]) by ms-smtp-05.nyroc.rr.com (8.13.6/8.13.6) with ESMTP id > l54L0m7g003748; Mon, 4 Jun 2007 17:00:48 -0400 (EDT) >From: Steven Rostedt <rostedt@goodmis.org> >To: john stultz <johnstul@us.ibm.com> >Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>, Oleg Nesterov <oleg@tv-sign.ru>, sshtylyov@ru.mvista.com >Content-Type: text/plain >Message-Id: <1180990847.18444.9.camel@localhost.localdomain> >Mime-Version: 1.0 >X-Virus-Scanned: Symantec AntiVirus Scan Engine >Subject: [HACK] see if this fixes the softirq warn-on >Resent-From: Thomas Gleixner <tglx@linutronix.de> >Resent-To: john stultz <johnstul@us.ibm.com> >Date: Mon, 04 Jun 2007 23:56:13 +0200 >X-Mailer: Evolution 2.10.1 (2.10.1-4.fc7) >Resent-Message-Id: <20070604215613.D847665C065@mail.tglx.de> >Resent-Date: Mon, 4 Jun 2007 23:56:13 +0200 (CEST) >X-Xagent-From: rostedt@goodmis.org >X-Xagent-To: johnstul@linux.vnet.ibm.com >X-Xagent-Gateway: vmsdvma.vnet.ibm.com (XAGENTU at VMSDVMA) >X-Evolution-Source: imap://johnstul@imap.linux.ibm.com/ >Content-Transfer-Encoding: 8bit > >John, > >here's my hack to see if this solves that tasklet problem. > >For those others that don't know the issue: > >We've been seeing a lot of WARN_ON coming from the tasklet code. >Specifically: > > if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) > WARN_ON(1); > > >Looking into this, one place that might be a problem is the >tasklet_kill. It seems that with the sleeps there, and the fact that >drivers seems to use this quite a bit, there's really no guarantee that >after a the tasklet has been waited on that it's not scheduled again >before it clears the TASKLET_STATE_SCHED bit. > >So here's a hack that tries to fix this. > >Comments? > >John, does this solve the issue on your test boxes? > >Signed-off-by: Steven Rostedt <srostedt@redhat.com> > >Index: linux-2.6.21-rt9/kernel/softirq.c >=================================================================== >--- linux-2.6.21-rt9.orig/kernel/softirq.c >+++ linux-2.6.21-rt9/kernel/softirq.c >@@ -535,10 +535,14 @@ struct tasklet_head > struct tasklet_struct *list; > }; > >-/* Some compilers disobey section attribute on statics when not >- initialized -- RR */ >-static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { NULL }; >-static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { NULL }; >+/* >+ * Initialize to something other than NULL so we can test >+ * if a tasklet is on the list or not; >+ */ >+#define TASKLET_LIST_END ((void*)0x101) >+ >+static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { TASKLET_LIST_END }; >+static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { TASKLET_LIST_END }; > > static void inline > __tasklet_common_schedule(struct tasklet_struct *t, struct tasklet_head *head, unsigned int nr) >@@ -599,9 +603,14 @@ __tasklet_action(struct softirq_action * > { > int loops = 1000000; > >- while (list) { >+ while (list != TASKLET_LIST_END) { > struct tasklet_struct *t = list; > >+ if (!list) { >+ WARN_ON(1); >+ break; >+ } >+ > list = list->next; > /* > * Should always succeed - after a tasklist got on the >@@ -674,7 +683,7 @@ static void tasklet_action(struct softir > > local_irq_disable(); > list = __get_cpu_var(tasklet_vec).list; >- __get_cpu_var(tasklet_vec).list = NULL; >+ __get_cpu_var(tasklet_vec).list = TASKLET_LIST_END; > local_irq_enable(); > > __tasklet_action(a, list); >@@ -686,7 +695,7 @@ static void tasklet_hi_action(struct sof > > local_irq_disable(); > list = __get_cpu_var(tasklet_hi_vec).list; >- __get_cpu_var(tasklet_hi_vec).list = NULL; >+ __get_cpu_var(tasklet_hi_vec).list = TASKLET_LIST_END; > local_irq_enable(); > > __tasklet_action(a, list); >@@ -709,13 +718,19 @@ void tasklet_kill(struct tasklet_struct > if (in_interrupt()) > printk("Attempt to kill tasklet from interrupt\n"); > >+again: > while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { > do > msleep(1); > while (test_bit(TASKLET_STATE_SCHED, &t->state)); > } > tasklet_unlock_wait(t); >- clear_bit(TASKLET_STATE_SCHED, &t->state); >+ if (test_bit(TASKLET_STATE_SCHED, &t->state)) { >+ /* only clear the bit if the tasklet is not added back to the list */ >+ if (t->next || test_bit(TASKLET_STATE_RUN, &t->state)) >+ goto again; /* still scheduled?? */ >+ clear_bit(TASKLET_STATE_SCHED, &t->state); >+ } > } > > EXPORT_SYMBOL(tasklet_kill); >@@ -873,12 +888,12 @@ void takeover_tasklets(unsigned int cpu) > /* Find end, append list for that CPU. */ > for (i = &__get_cpu_var(tasklet_vec).list; *i; i = &(*i)->next); > *i = per_cpu(tasklet_vec, cpu).list; >- per_cpu(tasklet_vec, cpu).list = NULL; >+ per_cpu(tasklet_vec, cpu).list = TASKLET_LIST_END; > raise_softirq_irqoff(TASKLET_SOFTIRQ); > > for (i = &__get_cpu_var(tasklet_hi_vec).list; *i; i = &(*i)->next); > *i = per_cpu(tasklet_hi_vec, cpu).list; >- per_cpu(tasklet_hi_vec, cpu).list = NULL; >+ per_cpu(tasklet_hi_vec, cpu).list = TASKLET_LIST_END; > raise_softirq_irqoff(HI_SOFTIRQ); > > local_irq_enable(); > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 242422
: 156165 |
156301