rpms/kernel/F-7 linux-2.6-prevent-idle-softirq.patch, NONE, 1.1 kernel-2.6.spec, 1.3184, 1.3185
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue May 22 04:09:00 UTC 2007
Author: davej
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16129
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-prevent-idle-softirq.patch
Log Message:
* Tue May 22 2007 Dave Jones <davej at redhat.com>
- Prevent going idle with softirq pending.
linux-2.6-prevent-idle-softirq.patch:
--- NEW FILE linux-2.6-prevent-idle-softirq.patch ---
>From davej Mon May 21 17:36:55 2007
Return-path: <linux-kernel-owner+davej=40kernelslacker.org-S1762727AbXEUVeh at vger.kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
gelk.kernelslacker.org
X-Spam-Level:
X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham
version=3.1.8
Envelope-to: davej at kernelslacker.org
Delivery-date: Mon, 21 May 2007 22:34:46 +0100
Received: from testure.choralone.org [194.9.77.134]
by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
for <davej at localhost> (single-drop); Mon, 21 May 2007 17:36:55 -0400 (EDT)
Received: from vger.kernel.org ([209.132.176.167])
by testure.choralone.org with esmtp (Exim 4.63)
(envelope-from <linux-kernel-owner+davej=40kernelslacker.org-S1762727AbXEUVeh at vger.kernel.org>)
id 1HqFWg-0006iA-E2
for davej at kernelslacker.org; Mon, 21 May 2007 22:34:46 +0100
Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
id S1762727AbXEUVeh (ORCPT <rfc822;davej at kernelslacker.org>);
Mon, 21 May 2007 17:34:37 -0400
Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1756769AbXEUVe1
(ORCPT <rfc822;linux-kernel-outgoing>);
Mon, 21 May 2007 17:34:27 -0400
Received: from www.osadl.org ([213.239.205.134]:45331 "EHLO mail.tglx.de"
rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP
id S1755162AbXEUVe0 (ORCPT <rfc822;linux-kernel at vger.kernel.org>);
Mon, 21 May 2007 17:34:26 -0400
Received: from [IPv6:::1] (debian [213.239.205.147])
by mail.tglx.de (Postfix) with ESMTP id 638E265C065;
Mon, 21 May 2007 23:34:24 +0200 (CEST)
Subject: [PATCH] Prevent going idle with softirq pending
From: Thomas Gleixner <tglx at linutronix.de>
To: Linus Torvalds <torvalds at osdl.org>
Cc: LKML <linux-kernel at vger.kernel.org>, Ingo Molnar <mingo at elte.hu>,
Andrew Morton <akpm at osdl.org>,
David Miller <davem at davemloft.net>,
Stable Team <stable at kernel.org>,
Anant Nitya <kernel at prachanda.info>
Content-Type: text/plain
Date: Mon, 21 May 2007 23:34:24 +0200
Message-Id: <1179783264.12708.70.camel at chaos>
Mime-Version: 1.0
X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6)
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner at vger.kernel.org
Precedence: bulk
X-Mailing-List: linux-kernel at vger.kernel.org
Status: RO
Content-Length: 1554
Lines: 45
The NOHZ patch contains a check for softirqs pending when a CPU goes
idle. The BUG is unrelated to NOHZ, it just was made visible by the NOHZ
patch. The BUG showed up mainly on P4 / hyperthreading enabled machines
which lead the investigations into the wrong direction in the first
place. The real cause is in cond_resched_softirq():
cond_resched_softirq() is enabling softirqs without invoking the softirq
daemon when softirqs are pending. This leads to the warning message in
the NOHZ idle code:
t1 runs softirq disabled code on CPU#0
interrupt happens, softirq is raised, but deferred (softirqs disabled)
t1 calls cond_resched_softirq()
enables softirqs via _local_bh_enable()
calls schedule()
t2 runs
t1 is migrated to CPU#1
t2 is done and invokes idle()
NOHZ detects the pending softirq
Fix: change _local_bh_enable() to local_bh_enable() so the softirq
daemon is invoked.
Thanks to Anant Nitya for debugging this with great patience !
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4776,7 +4776,7 @@ int __sched cond_resched_softirq(void)
if (need_resched() && system_state == SYSTEM_RUNNING) {
raw_local_irq_disable();
- _local_bh_enable();
+ local_bh_enable();
raw_local_irq_enable();
__cond_resched();
local_bh_disable();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3184
retrieving revision 1.3185
diff -u -r1.3184 -r1.3185
--- kernel-2.6.spec 22 May 2007 04:05:19 -0000 1.3184
+++ kernel-2.6.spec 22 May 2007 04:08:25 -0000 1.3185
@@ -585,6 +585,7 @@
Patch1750: linux-2.6-singlethread-freezable-workqueues.patch
Patch1770: linux-2.6-optimise-spinlock-debug.patch
Patch1771: linux-2.6-silence-noise.patch
+Patch1780: linux-2.6-prevent-idle-softirq.patch
Patch1791: linux-2.6-libertas.diff
Patch1792: linux-2.6-olpc-touchpad.diff
Patch1793: linux-2.6-raid-autorun.patch
@@ -1344,6 +1345,8 @@
%patch1770 -p1
# Silence some useless messages that still get printed with 'quiet'
%patch1771 -p1
+# Prevent going idle with softirq pending
+%patch1780 -p1
# OLPC specific patches
%if 0%{?olpc}
@@ -2411,6 +2414,9 @@
%changelog
* Tue May 22 2007 Dave Jones <davej at redhat.com>
+- Prevent going idle with softirq pending.
+
+* Tue May 22 2007 Dave Jones <davej at redhat.com>
- fix oops in sysfs_readdir.
* Tue May 22 2007 Dave Jones <davej at redhat.com>
More information about the fedora-extras-commits
mailing list