All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mark Knecht <markknecht@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Lee Revell <rlrevell@gmail.com>
Subject: Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU
Date: Sun, 10 Jun 2007 19:24:52 +0200	[thread overview]
Message-ID: <20070610172452.GA7560@elte.hu> (raw)
In-Reply-To: <5bdc1c8b0706100946k3acd6374uac8248e78f97433d@mail.gmail.com>


* Mark Knecht <markknecht@gmail.com> wrote:

> 23:    1739277   IO-APIC-fasteoi   ohci_hcd:usb2, eth0

> 00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)

ok, that's forcedeth. Does that behavior go away if you revert the 
change below, via patch -p0 -R ?

but in general, -rt will track IRQ cpu usage accurately, while mainline 
does not measure it at all when in idle. So a frequent IRQ on mainline 
might be using up similar amounts of of CPU time as well, but it's not 
reported.

	Ingo

---
 drivers/net/forcedeth.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Index: linux-rt.q/drivers/net/forcedeth.c
===================================================================
--- linux-rt.q.orig/drivers/net/forcedeth.c
+++ linux-rt.q/drivers/net/forcedeth.c
@@ -800,7 +800,7 @@ struct fe_priv {
  * Maximum number of loops until we assume that a bit in the irq mask
  * is stuck. Overridable with module param.
  */
-static int max_interrupt_work = 5;
+static int max_interrupt_work = 50;
 
 /*
  * Optimization can be either throuput mode or cpu mode
@@ -812,7 +812,7 @@ enum {
 	NV_OPTIMIZATION_MODE_THROUGHPUT,
 	NV_OPTIMIZATION_MODE_CPU
 };
-static int optimization_mode = NV_OPTIMIZATION_MODE_THROUGHPUT;
+static int optimization_mode = NV_OPTIMIZATION_MODE_CPU;
 
 /*
  * Poll interval for timer irq
@@ -3108,9 +3108,17 @@ static int nv_napi_poll(struct net_devic
 	int retcode;
 
 	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
+		spin_lock_irqsave(&np->lock, flags);
+		nv_tx_done(dev);
+		spin_unlock_irqrestore(&np->lock, flags);
+
 		pkts = nv_rx_process(dev, limit);
 		retcode = nv_alloc_rx(dev);
 	} else {
+		spin_lock_irqsave(&np->lock, flags);
+		nv_tx_done_optimized(dev, np->tx_ring_size);
+		spin_unlock_irqrestore(&np->lock, flags);
+
 		pkts = nv_rx_process_optimized(dev, limit);
 		retcode = nv_alloc_rx_optimized(dev);
 	}

  reply	other threads:[~2007-06-10 17:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10 16:46 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU Mark Knecht
2007-06-10 17:24 ` Ingo Molnar [this message]
2007-06-10 17:38   ` Mark Knecht
2007-06-10 18:07     ` Ingo Molnar
2007-06-10 20:44       ` Mark Knecht
2007-06-11  7:57         ` Ingo Molnar
2007-06-11 13:47           ` Mark Knecht

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=20070610172452.GA7560@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markknecht@gmail.com \
    --cc=rlrevell@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.