From: jc <jchapman@katalix.com>
To: scott.feldman@intel.com, Robert.Olsson@data.slu.se, jgarzik@pobox.com
Cc: gnb@melbourne.sgi.com, davem@redhat.com, netdev@oss.sgi.com
Subject: RE: [PATCH] make tg3 NAPI support configurable
Date: Thu, 15 Jan 2004 08:01:42 +0000 [thread overview]
Message-ID: <1074153702.400648e62916f@webmail.katalix.com> (raw)
Hi all,
I found that testing if any tx work is done in dev->poll before exiting
polled mode improves performance by about 7% (max) in a 2-port e100 bridge
forwarding unidirectional test case. If tx work is not considered when
deciding whether to netif_rx_complete, the transmitting interface sees
loads of interrupts and hence forwarding throughput is degraded.
When testing with bidirectional test data, no improvement is seen since
the dev->poll is kept in polled mode on both interfaces due to
receive work.
Hope this helps.
-jc
> > > Furthermore NAPI can be extended to schedule dev->poll even for TX-
> > > interrupts. There is pacth for e1000 doing this. We see about 5-8%
> > > overall system packet improvement with this.
> > I was thinking of a variant JC [jchapman@katalix.com]
> > mentioned on this list some time ago. He also sent me
> > the patch for e1000. A test and the patch is below.
>
> JC contributed almost the exact patch for the e100 rewrite and it did
> help Tx, but I don't remember how much. JC, do you remember? Here is
> the snippet:
>
> static int e100_poll(struct net_device *netdev, int *budget)
> {
> struct nic *nic = netdev->priv;
> unsigned int work_to_do = min(netdev->quota, *budget);
> unsigned int work_done = 0;
> int tx_cleaned;
>
> e100_rx_clean(nic, &work_done, work_to_do);
> tx_cleaned = e100_tx_clean(nic);
>
> /* If no Rx and Tx cleanup work was done, exit polling mode. */
> if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev))
> {
> netif_rx_complete(netdev);
> e100_enable_irq(nic);
> return 0;
> }
>
> *budget -= work_done;
> netdev->quota -= work_done;
>
> return 1;
> }
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
next reply other threads:[~2004-01-15 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-15 8:01 jc [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-14 0:23 [PATCH] make tg3 NAPI support configurable Feldman, Scott
2003-12-19 12:48 Greg Banks
2003-12-19 13:20 ` Robert Olsson
2004-01-11 1:49 ` Jeff Garzik
2004-01-12 0:12 ` Greg Banks
2004-01-13 19:09 ` Robert Olsson
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=1074153702.400648e62916f@webmail.katalix.com \
--to=jchapman@katalix.com \
--cc=Robert.Olsson@data.slu.se \
--cc=davem@redhat.com \
--cc=gnb@melbourne.sgi.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=scott.feldman@intel.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).