From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754185Ab1L1RNs (ORCPT ); Wed, 28 Dec 2011 12:13:48 -0500 Received: from mail.solarflare.com ([216.237.3.220]:24467 "EHLO ocex02.SolarFlarecom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753779Ab1L1RNr (ORCPT ); Wed, 28 Dec 2011 12:13:47 -0500 Message-ID: <1325092423.2327.70.camel@deadeye> Subject: Re: [PATCH 1/1] via-rhine: Fix hanging with high CPU load on low-end broads. From: Ben Hutchings To: Bjarke Istrup Pedersen CC: , , Roger Luethi Date: Wed, 28 Dec 2011 18:13:43 +0100 In-Reply-To: References: <1325075319-13464-1-git-send-email-gurligebis@gentoo.org> <1325083051.2327.47.camel@deadeye> Organization: Solarflare Communications Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2-1 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [176.99.123.158] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-6.800.1017-18604.005 X-TM-AS-Result: No--10.741700-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2011-12-28 at 16:14 +0100, Bjarke Istrup Pedersen wrote: > 2011/12/28 Ben Hutchings : > > On Wed, 2011-12-28 at 12:28 +0000, Bjarke Istrup Pedersen wrote: > >> 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. > > > > This is completely wrong. In a UP configuration the extra spinlock > > calls have no effect (except perhaps a small delay). In an SMP > > configuration they will cause rhine_tx() to deadlock when it also tries > > to acquire the spinlock. > > > > Ben. > > Okay, the Soekris net5501-70 boxes are single-core, and I haven't got > any SMP boxes with that nic. > Is there a better solution for the problem then, to avoid it hanging > the box on a non-smp machine with a slow (500mhz) cpu? If the system actually hangs then I assume there is some bug in the driver. I would guess the actual problem is that the interrupt and NAPI handlers are running constantly so that user processes never run (which I think counts as soft lockup). If the hardware supports it, interrupt moderation may help a little by slightly reducing the per-packet processing cost, but it isn't a full solution. Or you can use a real-time kernel, which schedules interrupt and NAPI handlers as tasks, and adjust priorities so that user processes can still run. But that brings its own problems (including generally lower throughput). Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.