netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Cole <bacole@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: john@BlueSkyTours.com, netdev@vger.kernel.org
Subject: Re: r8169: slow samba performance
Date: Tue, 04 Sep 2007 14:51:59 -0700	[thread overview]
Message-ID: <46DDD37F.8080905@gmail.com> (raw)
In-Reply-To: <20070904203742.GB31783@electric-eye.fr.zoreil.com>

Francois Romieu wrote:
> Does "acceptable" mean that there is a noticeable difference when compared
> to the patch based on a busy-waiting loop ?
>
>   
>> Would you like me to *just* try patches 1 & 2, to help narrow down anything?
>>     
>
> I expect patch #2 alone to be enough to enhance the performance. If it gets
> proven, the patch would be a good candidate for a quick merge upstream.
>
>   
Patch #0002 looks functionally equivalent to the patch I already pointed 
folks
to and which I showed as being sufficient to address the TX queue problem.
The fix has also already been confirmed by shane, that fix being:

diff -c r/r8169.c r3/r8169-out.c
*** r/r8169.c   2007-08-18 11:54:58.000000000 -0700
--- r3/r8169-out.c      2007-09-04 14:23:49.000000000 -0700
***************
*** 2646,2651 ****
--- 2646,2655 ----
                if (netif_queue_stopped(dev) &&
                    (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
                        netif_wake_queue(dev);
+               } else if (dirty_tx != tp->cur_tx) {
+                       netif_tx_lock(dev);
+                       RTL_W8(TxPoll, NPQ);
+                       netif_tx_unlock(dev);
                }
        }
  }


In any case, I've tried your latest version of the patch,
0002-r8169-workaround-against-ignored-TxPoll-writes-8168.patch, and it alone
works as well.


I'm not sure why you describe this as being an "8168 hack", given that the
problem has been seen with the 8111b chip (I have an 8111b chip on my 
gigabyte
motherboard).


Now since this change heals the TX queue stall, it would seem that the real
underlying problem involves a race condition with enqueueing to the TX queue
while the controller is processing the queue.  The ultimate fix for that 
I bet
is either to address locking at TX enqueue time, or there is a 
controller bug.
Any clarification from realtek on the necessary processing for the NPQ 
bit, or
a known controller problem?
 
PS: I've also received private email that this problem pertains to video
streaming (to a Kiss DVD player) not just samba or X11 traffic.  Basically
most all high-level TCP based protocols are affected it seems.  This serious
performance problem should be considered to impact a lot more than just 
samba
users.




  parent reply	other threads:[~2007-09-04 21:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 16:39 r8169: slow samba performance Bruce Cole
     [not found] ` <20070822182116.GA5445@csy.ca>
2007-08-22 19:46   ` Bruce Cole
2007-08-27 22:34     ` john
2007-09-03 21:03       ` Francois Romieu
2007-09-04 20:04         ` john
2007-09-04 20:37           ` Francois Romieu
2007-09-04 21:00             ` john
2007-09-04 21:51             ` Bruce Cole [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-09  7:44 David Madsen
2007-09-09 15:33 ` Francois Romieu
2007-09-14  1:31   ` David Madsen
2007-09-16  1:11   ` David Madsen

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=46DDD37F.8080905@gmail.com \
    --to=bacole@gmail.com \
    --cc=john@BlueSkyTours.com \
    --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).