The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, Roger Luethi <rl@hellgate.ch>,
	Bjarke Istrup Pedersen <gurligebis@gentoo.org>
Subject: [PATCH 1/1] via-rhine: Fix hanging with high CPU load on low-end broads.
Date: Wed, 28 Dec 2011 12:28:39 +0000	[thread overview]
Message-ID: <1325075319-13464-1-git-send-email-gurligebis@gentoo.org> (raw)

Working around problem causing high CPU load and hanging system when
there is alot of network trafic.

It is kind of an ugly way to work around it, but it allows the Soekris
net5501 to have trafic between two of it's NICs without hanging so much
that the watchdog kicks in and does a hard reboot of the system.

There is more info on the problem here:
http://http://lists.soekris.com/pipermail/soekris-tech/2010-October/016889.html

Tested with positive results on two Soekris net5501-70 boxes.

Signed-off-by: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
---
 drivers/net/ethernet/via/via-rhine.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index f34dd99..8c77dcd 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1567,6 +1567,9 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance)
 	int boguscnt = max_interrupt_work;
 	int handled = 0;
 
+	if (!spin_trylock(&rp->lock))
+		return IRQ_RETVAL(handled);
+
 	while ((intr_status = get_intr_status(dev))) {
 		handled = 1;
 
@@ -1616,6 +1619,8 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance)
 		}
 	}
 
+	spin_unlock(&rp->lock);
+
 	if (debug > 3)
 		netdev_dbg(dev, "exiting interrupt, status=%08x\n",
 			   ioread16(ioaddr + IntrStatus));
-- 
1.7.8


             reply	other threads:[~2011-12-28 12:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 12:28 Bjarke Istrup Pedersen [this message]
2011-12-28 14:37 ` [PATCH 1/1] via-rhine: Fix hanging with high CPU load on low-end broads Ben Hutchings
2011-12-28 15:14   ` Bjarke Istrup Pedersen
2011-12-28 17:13     ` Ben Hutchings
2011-12-28 17:30       ` Bjarke Istrup Pedersen
2011-12-28 18:17         ` Stephen Hemminger
2011-12-28 18:34           ` David Miller
2011-12-28 19:16             ` Bjarke Istrup Pedersen
2011-12-29 15:39               ` Francois Romieu
2011-12-29 18:39                 ` Francois Romieu
2011-12-29 22:00                   ` Bjarke Istrup Pedersen
2011-12-29 22:05                   ` David Miller
2011-12-29 23:19                     ` Bjarke Istrup Pedersen
2011-12-29 23:37                       ` Bjarke Istrup Pedersen
2011-12-29 23:48                         ` David Miller
2011-12-30  1:18                           ` Bjarke Istrup Pedersen
2011-12-29 23:53                         ` Francois Romieu
2011-12-30  1:21                           ` Bjarke Istrup Pedersen
2011-12-30 11:48                           ` Bjarke Istrup Pedersen
2011-12-30 12:56                             ` Francois Romieu
2011-12-30 13:51                               ` Bjarke Istrup Pedersen
2011-12-30 18:03                                 ` Francois Romieu
2011-12-30 18:45                                   ` Bjarke Istrup Pedersen
2011-12-30 20:38                                   ` Bjarke Istrup Pedersen
2011-12-30 21:50                                     ` Francois Romieu
2011-12-30 22:08                                       ` Bjarke Istrup Pedersen
2011-12-30 22:08                                         ` Francois Romieu
2011-12-30 22:13                                       ` Bjarke Istrup Pedersen
2011-12-30 22:19                                         ` Francois Romieu
2011-12-30 22:41                                           ` Bjarke Istrup Pedersen
2011-12-31  1:37                                             ` Bjarke Istrup Pedersen
2011-12-31 12:17                                               ` Francois Romieu
2012-01-01 12:09                                                 ` Bjarke Istrup Pedersen
2012-01-01 21:15                                                 ` Bjarke Istrup Pedersen
2012-01-03 19:20                                                 ` Bjarke Istrup Pedersen
2012-01-03 22:32                                                   ` Francois Romieu
2012-01-04  7:59                                                     ` Bjarke Istrup Pedersen
2012-01-05 12:01                                                       ` Bjarke Istrup Pedersen
2012-01-05 16:20                                                         ` Francois Romieu
2012-01-05 16:46                                                           ` Bjarke Istrup Pedersen
2012-01-05 17:12                                                         ` David Miller

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=1325075319-13464-1-git-send-email-gurligebis@gentoo.org \
    --to=gurligebis@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    /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