From: Francois Romieu <romieu@fr.zoreil.com>
To: Andrew Morton <akpm@osdl.org>
Cc: a.nielsen@optushome.com.au, linux-kernel@vger.kernel.org,
torvalds@osdl.org, degger@tarantel.rz.fh-muenchen.de
Subject: Re: [PATCH] Fix kernel lockup in RTL-8169 gigabit ethernet driver
Date: Sat, 3 Apr 2004 14:13:29 +0200 [thread overview]
Message-ID: <20040403141329.A20457@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20040403020740.33ef375f.akpm@osdl.org>; from akpm@osdl.org on Sat, Apr 03, 2004 at 02:07:40AM -0800
Andrew Morton <akpm@osdl.org> :
[...]
> The logic is faulty, or at least very odd.
>
> tx_left = tp->cur_tx - dirty_tx;
>
> while (tx_left > 0) {
> int entry = dirty_tx % NUM_TX_DESC;
>
> if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
> ...
> }
> }
>
> Why is that `if' test there at all? If it ever returns false, the box
It checks that the network card has returned the buffer to the host computer.
The code will loop in the irq handler until every buffer submitted
for Tx is processed
- it is gross;
- it is not robust;
- I assume that's why the driver sucks cpu like hell on high Tx traffic;
- ... but it is not faulty.
> locks up. A BUG_ON(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)
> might make more sense.
In Linus's current tree, I doubt it: assume the host has submitted a few
packets for Tx and the network card issue an interrupt for the first one
whereas the second descriptor still belongs to the network card -> boom.
--
Ueimor
next prev parent reply other threads:[~2004-04-03 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-03 5:02 Adam Nielsen
2004-04-03 9:27 ` Francois Romieu
2004-04-03 10:07 ` Andrew Morton
2004-04-03 12:13 ` Francois Romieu [this message]
2004-04-03 11:30 Manfred Spraul
2004-04-03 12:45 ` Francois Romieu
2004-04-04 0:55 ` Malvineous
2004-04-04 9:15 ` Francois Romieu
2004-04-05 21:51 ` Adam Nielsen
2004-04-06 17:11 ` Manfred Spraul
2004-04-06 20:50 ` Francois Romieu
2004-04-05 23:08 Dieter Nützel
2004-04-06 7:47 ` Francois Romieu
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=20040403141329.A20457@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=a.nielsen@optushome.com.au \
--cc=akpm@osdl.org \
--cc=degger@tarantel.rz.fh-muenchen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®