From: Bruce Cole <bacole@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>, netdev@vger.kernel.org
Cc: David Gundersen <gundy@iinet.net.au>, bacole@gmail.com
Subject: Re: [RFT] r8169 changes against 2.6.23-rc3
Date: Tue, 21 Aug 2007 22:51:50 -0700 [thread overview]
Message-ID: <46CBCEF6.5080806@gmail.com> (raw)
In-Reply-To: <46CB3DE4.4060107@gmail.com>
So I did some experimenting with locking, but eventually found that this
chunk:
@@ -2677,10 +2681,18 @@ static void rtl8169_tx_interrupt(struct
net_device *dev,
if (tp->dirty_tx != dirty_tx) {
tp->dirty_tx = dirty_tx;
- - smp_wmb();
- - if (netif_queue_stopped(dev) &&
- - (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
- - netif_wake_queue(dev);
+ smp_mb();
+ if (unlikely(netif_queue_stopped(dev))) {
+ netif_tx_lock(dev);
+ if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)
+ netif_wake_queue(dev);
+ if (dirty_tx != tp->cur_tx)
+ RTL_W8(TxPoll, NPQ);
+ netif_tx_unlock(dev);
+ } else if (dirty_tx != tp->cur_tx) {
+ netif_tx_lock(dev);
+ RTL_W8(TxPoll, NPQ);
+ netif_tx_unlock(dev);
}
}
}
from the patch in http://www.spinics.net/lists/netdev/msg33960.html
was sufficient to fix the stuck TX queue bug without the busy-wait.
Actually
just the else portion of the above chunk was sufficient in my testing,
without
the barrier change or the if statement change.
David Gundersen pointed me to this potential fix days ago, but I didn't
consider it first since the change had (presumably intentionally) been
dropped from
the set of diffs Francois pointed me to. Given that I had reported the same
problem as David Gundersen (and Dirk, and other samba users...) I
thought this
patch had been ruled out. Apparently not. Hopefully this can be dusted off
and made into a fairly high priority fix as it has been biting realtek users
since last year at least.
next prev parent reply other threads:[~2007-08-22 5:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 19:32 [RFT] r8169 changes against 2.6.23-rc3 Bruce Cole
2007-08-22 5:51 ` Bruce Cole [this message]
[not found] <20070818100701.GA20703@electric-eye.fr.zoreil.com>
2007-08-19 2:41 ` Bruce Cole
2007-08-20 8:34 ` Dirk
2007-08-20 18:58 ` Chuck Lever
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=46CBCEF6.5080806@gmail.com \
--to=bacole@gmail.com \
--cc=gundy@iinet.net.au \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).