Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mark Knecht <markknecht@...>
Cc: linux-kernel <linux-kernel@...>, Lee Revell <rlrevell@...>
Date: Sunday, June 10, 2007 - 1:24 pm

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



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);
 	}
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Mark Knecht, (Sun Jun 10, 12:46 pm)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Ingo Molnar, (Sun Jun 10, 1:24 pm)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Mark Knecht, (Sun Jun 10, 1:38 pm)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Ingo Molnar, (Sun Jun 10, 2:07 pm)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Mark Knecht, (Sun Jun 10, 4:44 pm)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Ingo Molnar, (Mon Jun 11, 3:57 am)
Re: 2.6.21-rt9 - IRQ23 consuming a steady 2.7% of CPU, Mark Knecht, (Mon Jun 11, 9:47 am)