public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ravikiran G Thirumalai <kiran@in.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: hot cache line due to note_interrupt()
Date: Fri, 14 Nov 2003 11:45:35 -0600	[thread overview]
Message-ID: <20031114174535.GA30388@sgi.com> (raw)
In-Reply-To: <20031111115804.4aaafd28.akpm@osdl.org>

On Tue, Nov 11, 2003 at 11:58:04AM -0800, Andrew Morton wrote:
> Ravikiran G Thirumalai <kiran@in.ibm.com> wrote:
> >
> > On Mon, Nov 10, 2003 at 03:58:44PM -0600, Jack Steiner wrote:
> > > 
> > > I dont know the background on note_interrupt() in arch/ia64/kernel/irq.c, 
> > > but I had to disable the function on our large systems (IA64).
> > > 
> > > The function updates a counter in the irq_desc_t table. An entry in this table
> > > is shared by all cpus that take a specific interrupt #. For most interrupt #'s,
> > > this is a problem but it is prohibitive for the timer tick on big systems.
> > > 
> > > Updating the counter causes a cache line to be bounced between
> > > cpus at a rate of at least HZ*active_cpus. (The number of bus transactions
> > 
> > The answer to this is probably alloc_percpu for the counters.
> 
> Or just make noirqdebug the default.
> 
> The note_interrupt() stuff is only useful for diagnosing mysterious lockups
> (and hasn't proven useful for that, actually).  It should be disabled for
> production use.
> 


Probably too late for 2.6.0, but here is a patch that disables noirqdebug:



# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1438  -> 1.1439 
#	arch/i386/kernel/irq.c	1.45    -> 1.46   
#	arch/mips/kernel/irq.c	1.14    -> 1.15   
#	arch/ppc64/kernel/irq.c	1.36    -> 1.37   
#	arch/ia64/kernel/irq.c	1.31    -> 1.32   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/14	steiner@attica.americas.sgi.com	1.1439
# Change the default value for "irqdebug" so that it is disabled.
# Rename option from "noirqdebug" to "irqdebug".
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
--- a/arch/i386/kernel/irq.c	Fri Nov 14 11:18:07 2003
+++ b/arch/i386/kernel/irq.c	Fri Nov 14 11:18:07 2003
@@ -259,16 +259,16 @@
 	}
 }
 
-static int noirqdebug;
+static int irqdebug;
 
-static int __init noirqdebug_setup(char *str)
+static int __init irqdebug_setup(char *str)
 {
-	noirqdebug = 1;
-	printk("IRQ lockup detection disabled\n");
+	irqdebug = 1;
+	printk("IRQ lockup detection enabled\n");
 	return 1;
 }
 
-__setup("noirqdebug", noirqdebug_setup);
+__setup("irqdebug", irqdebug_setup);
 
 /*
  * If 99,900 of the previous 100,000 interrupts have not been handled then
@@ -484,7 +484,7 @@
 		spin_unlock(&desc->lock);
 		action_ret = handle_IRQ_event(irq, &regs, action);
 		spin_lock(&desc->lock);
-		if (!noirqdebug)
+		if (irqdebug)
 			note_interrupt(irq, desc, action_ret);
 		if (likely(!(desc->status & IRQ_PENDING)))
 			break;
diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
--- a/arch/ia64/kernel/irq.c	Fri Nov 14 11:18:07 2003
+++ b/arch/ia64/kernel/irq.c	Fri Nov 14 11:18:07 2003
@@ -283,16 +283,16 @@
 	}
 }
 
-static int noirqdebug;
+static int irqdebug;
 
-static int __init noirqdebug_setup(char *str)
+static int __init irqdebug_setup(char *str)
 {
-	noirqdebug = 1;
-	printk("IRQ lockup detection disabled\n");
+	irqdebug = 1;
+	printk("IRQ lockup detection enabled\n");
 	return 1;
 }
 
-__setup("noirqdebug", noirqdebug_setup);
+__setup("irqdebug", irqdebug_setup);
 
 /*
  * If 99,900 of the previous 100,000 interrupts have not been handled then
@@ -457,7 +457,7 @@
 		desc->handler->ack(irq);
 		action_ret = handle_IRQ_event(irq, regs, desc->action);
 		desc->handler->end(irq);
-		if (!noirqdebug)
+		if (irqdebug)
 			note_interrupt(irq, desc, action_ret);
 	} else {
 		spin_lock(&desc->lock);
@@ -504,7 +504,7 @@
 			spin_unlock(&desc->lock);
 			action_ret = handle_IRQ_event(irq, regs, action);
 			spin_lock(&desc->lock);
-			if (!noirqdebug)
+			if (irqdebug)
 				note_interrupt(irq, desc, action_ret);
 			if (!(desc->status & IRQ_PENDING))
 				break;
diff -Nru a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
--- a/arch/mips/kernel/irq.c	Fri Nov 14 11:18:07 2003
+++ b/arch/mips/kernel/irq.c	Fri Nov 14 11:18:07 2003
@@ -191,16 +191,16 @@
 	}
 }
 
-static int noirqdebug;
+static int irqdebug;
 
-static int __init noirqdebug_setup(char *str)
+static int __init irqdebug_setup(char *str)
 {
-	noirqdebug = 1;
-	printk("IRQ lockup detection disabled\n");
+	irqdebug = 1;
+	printk("IRQ lockup detection enabled\n");
 	return 1;
 }
 
-__setup("noirqdebug", noirqdebug_setup);
+__setup("irqdebug", irqdebug_setup);
 
 /*
  * If 99,900 of the previous 100,000 interrupts have not been handled then
@@ -396,7 +396,7 @@
 		spin_unlock(&desc->lock);
 		action_ret = handle_IRQ_event(irq, regs, action);
 		spin_lock(&desc->lock);
-		if (!noirqdebug)
+		if (irqdebug)
 			note_interrupt(irq, desc, action_ret);
 		if (likely(!(desc->status & IRQ_PENDING)))
 			break;
diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c
--- a/arch/ppc64/kernel/irq.c	Fri Nov 14 11:18:07 2003
+++ b/arch/ppc64/kernel/irq.c	Fri Nov 14 11:18:07 2003
@@ -416,16 +416,16 @@
 	}
 }
 
-static int noirqdebug;
+static int irqdebug;
 
-static int __init noirqdebug_setup(char *str)
+static int __init irqdebug_setup(char *str)
 {
-	noirqdebug = 1;
-	printk("IRQ lockup detection disabled\n");
+	irqdebug = 1;
+	printk("IRQ lockup detection enabled\n");
 	return 1;
 }
 
-__setup("noirqdebug", noirqdebug_setup);
+__setup("irqdebug", irqdebug_setup);
 
 /*
  * If 99,900 of the previous 100,000 interrupts have not been handled then
@@ -538,7 +538,7 @@
 		spin_unlock(&desc->lock);
 		action_ret = handle_irq_event(irq, regs, action);
 		spin_lock(&desc->lock);
-		if (!noirqdebug)
+		if (irqdebug)
 			note_interrupt(irq, desc, action_ret);
 		if (likely(!(desc->status & IRQ_PENDING)))
 			break;

-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



  reply	other threads:[~2003-11-14 17:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-10 21:58 hot cache line due to note_interrupt() Jack Steiner
2003-11-10 23:00 ` Anton Blanchard
2003-11-11  8:29 ` Ravikiran G Thirumalai
2003-11-11 16:25   ` Anton Blanchard
2003-11-11 19:58   ` Andrew Morton
2003-11-14 17:45     ` Jack Steiner [this message]
2003-11-14 17:57       ` Andrew Morton
2003-11-14 18:11         ` Jack Steiner
2003-11-14 18:10       ` David Mosberger
2003-11-14 18:17       ` Linus Torvalds
2003-11-15  5:18         ` Jeff Garzik
2003-11-14 19:10       ` Anton Blanchard
2003-11-14 19:28         ` Mike Fedyk

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=20031114174535.GA30388@sgi.com \
    --to=steiner@sgi.com \
    --cc=akpm@osdl.org \
    --cc=kiran@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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