rpms/kernel/F-7 linux-2.6-softirq-printout-irq-trace-events.patch, NONE, 1.1 kernel-2.6.spec, 1.3197, 1.3198

Dave Jones (davej) fedora-extras-commits at redhat.com
Thu May 24 15:36:25 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16437

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-softirq-printout-irq-trace-events.patch 
Log Message:
* Thu May 24 2007 Dave Jones <davej at redhat.com>
- softirqs: print out irq-trace events. (#240982)


linux-2.6-softirq-printout-irq-trace-events.patch:

--- NEW FILE linux-2.6-softirq-printout-irq-trace-events.patch ---
>From davej  Thu May 24 11:09:36 2007
Return-Path: <cebbert at redhat.com>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
	gelk.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,INFO_TLD,
	UNPARSEABLE_RELAY autolearn=no version=3.1.8
Received: from pobox.devel.redhat.com [10.11.255.8]
	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
	for <davej at localhost> (single-drop); Thu, 24 May 2007 11:09:36 -0400 (EDT)
Received: from pobox.devel.redhat.com ([unix socket])
	 by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;
	 Thu, 24 May 2007 11:05:33 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id l4OF5X6T020270
	for <davej at pobox.devel.redhat.com>; Thu, 24 May 2007 11:05:33 -0400
Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12])
	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4OF5XHU002244
	for <davej at int-mx1.corp.redhat.com>; Thu, 24 May 2007 11:05:33 -0400
Received: from [172.16.83.145] (dhcp83-145.boston.redhat.com [172.16.83.145])
	by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id l4OF5WtT016174
	for <davej at redhat.com>; Thu, 24 May 2007 11:05:32 -0400
Message-ID: <4655A9BC.3000202 at redhat.com>
Date: Thu, 24 May 2007 11:05:32 -0400
From: Chuck Ebbert <cebbert at redhat.com>
Organization: Red Hat
User-Agent: Thunderbird 1.5.0.10 (X11/20070302)
MIME-Version: 1.0
To: Dave Jones <davej at redhat.com>
Subject: [Fwd: Re: [BUG] local_softirq_pending storm]
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 4816
Lines: 107

Dave, can we get this into the kernel and ask people to run the debug
kernel (it has PROVE_LOCKING enabled.) This is BZ #240982.

-------- Original Message --------
From: - Thu May 24 10:08:27 2007
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <mingo at elte.hu>
Received: from mail.boston.redhat.com ([unix socket])	 by mail.boston.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;	 Thu, 24 May 2007 03:46:16 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])	by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id l4O7kGS6012258	for <cebbert at boston.redhat.com>; Thu, 24 May 2007 03:46:16 -0400
Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31])	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4O7kGiL020925	for <cebbert at redhat.com>; Thu, 24 May 2007 03:46:16 -0400
Received: from mx2.mail.elte.hu (mx2.mail.elte.hu [157.181.151.9])	by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4O7kDV5026097	for <cebbert at redhat.com>; Thu, 24 May 2007 03:46:14 -0400
Received: from elvis.elte.hu ([157.181.1.14])	by mx2.mail.elte.hu with esmtp (Exim)	id 1Hr80v-00074C-LA	from <mingo at elte.hu>; Thu, 24 May 2007 09:45:41 +0200
Received: by elvis.elte.hu (Postfix, from userid 1004)	id B6B893E2149; Thu, 24 May 2007 09:45:32 +0200 (CEST)
Date: Thu, 24 May 2007 09:45:34 +0200
From: Ingo Molnar <mingo at elte.hu>
To: Chuck Ebbert <cebbert at redhat.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski at gmail.com>,        Thomas Gleixner <tglx at linutronix.de>,        Anant Nitya <kernel at prachanda.info>, linux-kernel at vger.kernel.org,        David Miller <davem at davemloft.net>,        Andrew Morton <akpm at linux-foundation.org>
Subject: Re: [BUG] local_softirq_pending storm
Message-ID: <20070524074534.GA21138 at elte.hu>
References: <200705091942.22920.kernel at prachanda.hub> <200705191525.28400.kernel at prachanda.hub> <1179601868.12981.127.camel at chaos> <200705200253.44992.kernel at prachanda.hub> <1179697388.6570.26.camel at chaos> <6bffcb0e0705221203s1ba21ed3j641e91036859db7d at mail.gmail.com> <20070522201046.GA6113 at elte.hu> <46547345.8000808 at redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <46547345.8000808 at redhat.com>
User-Agent: Mutt/1.4.2.2i
Received-SPF: softfail (mx2: transitioning domain of elte.hu does not designate 157.181.1.14 as permitted sender) client-ip=157.181.1.14; envelope-from=mingo at elte.hu; helo=elvis.elte.hu;
X-ELTE-VirusStatus: clean
X-ELTE-SpamScore: -2.0
X-ELTE-SpamLevel: 
X-ELTE-SpamCheck: no
X-ELTE-SpamVersion: ELTE 2.0
X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.1.7	-2.0 BAYES_00               BODY: Bayesian spam probability is 0 to 1%	[score: 0.0000]
X-RedHat-Spam-Score: 0


* Chuck Ebbert <cebbert at redhat.com> wrote:

> >  	if (need_resched() && system_state == SYSTEM_RUNNING) {
> > -		raw_local_irq_disable();
> > -		_local_bh_enable();
> > -		raw_local_irq_enable();
> > +		local_bh_enable();
> >  		__cond_resched();
> >  		local_bh_disable();
> >  		return 1;
> 
> We may have a problem with that:
> 
>  BUG: warning at kernel/softirq.c:138/local_bh_enable() (Not tainted)
>   [<c042b2ef>] local_bh_enable+0x45/0x92
>   [<c06036b7>] cond_resched_softirq+0x2c/0x42
>   [<c059d5d0>] release_sock+0x54/0xa3
>   [<c05c9428>] tcp_sendmsg+0x91b/0xa0c
>   [<c05e1bb9>] inet_sendmsg+0x3b/0x45
>   [<c059af34>] sock_aio_write+0xf9/0x105
>   [<c0476035>] do_sync_write+0xc7/0x10a
>   [<c0437265>] autoremove_wake_function+0x0/0x35
>   [<c047688e>] vfs_write+0xbc/0x154
>   [<c0476e8c>] sys_write+0x41/0x67
>   [<c0404f70>] syscall_call+0x7/0xb

hm, this place really shouldnt call cond_resched_softirq() with hardirqs 
disabled.

perhaps a buggy ->sk_backlog_rcv() handler disabled interrupts without 
restoring them?

could you enable CONFIG_PROVE_LOCKING and apply the patch below - which 
location is printed as having last disabled hardirqs?

	Ingo

--------------------->
Subject: [patch] softirqs: print out irq-trace events
From: Ingo Molnar <mingo at elte.hu>

some code is fiddling with softirqs but hardirqs are disabled, so try to 
figure out who disabled hardirqs.

Signed-off-by: Ingo Molnar <mingo at elte.hu>
---
 kernel/softirq.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: linux/kernel/softirq.c
===================================================================
--- linux.orig/kernel/softirq.c
+++ linux/kernel/softirq.c
@@ -135,7 +135,15 @@ void local_bh_enable(void)
 
 	WARN_ON_ONCE(in_irq());
 #endif
-	WARN_ON_ONCE(irqs_disabled());
+	if (irqs_disabled()) {
+		static int once = 1;
+
+		if (once) {
+			once = 0;
+			print_irqtrace_events(current);
+			WARN_ON(1);
+		}
+	}
 
 #ifdef CONFIG_TRACE_IRQFLAGS
 	local_irq_save(flags);



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3197
retrieving revision 1.3198
diff -u -r1.3197 -r1.3198
--- kernel-2.6.spec	24 May 2007 15:19:16 -0000	1.3197
+++ kernel-2.6.spec	24 May 2007 15:35:50 -0000	1.3198
@@ -587,6 +587,7 @@
 Patch1770: linux-2.6-optimise-spinlock-debug.patch
 Patch1771: linux-2.6-silence-noise.patch
 Patch1780: linux-2.6-prevent-idle-softirq.patch
+Patch1781: linux-2.6-softirq-printout-irq-trace-events.patch
 Patch1791: linux-2.6-libertas.diff
 Patch1792: linux-2.6-olpc-touchpad.diff
 Patch1793: linux-2.6-raid-autorun.patch
@@ -1350,6 +1351,8 @@
 %patch1771 -p1
 # Prevent going idle with softirq pending
 %patch1780 -p1
+# softirqs: print out irq-trace events
+%patch1781 -p1
 
 # OLPC specific patches
 %if 0%{?olpc}
@@ -2412,6 +2415,9 @@
 
 %changelog
 * Thu May 24 2007 Dave Jones <davej at redhat.com>
+- softirqs: print out irq-trace events. (#240982)
+
+* Thu May 24 2007 Dave Jones <davej at redhat.com>
 - Use upstream variant of x86-64 oprofile fix.
 
 * Thu May 24 2007 Dave Jones <davej at redhat.com>




More information about the fedora-extras-commits mailing list