netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [e1000 2.6 10/11] TxDescriptors -> 1024 default
@ 2003-09-12  5:13 Feldman, Scott
  2003-09-12 12:44 ` jamal
  0 siblings, 1 reply; 38+ messages in thread
From: Feldman, Scott @ 2003-09-12  5:13 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, ricardoz

> Feldman, Scott wrote:
> > * Change the default number of Tx descriptors from 256 to 1024.
> >   Data from [ricardoz@us.ibm.com] shows it's easy to overrun
> >   the Tx desc queue.
> 
> 
> All e1000 patches applied except this one.
> 
> You're just wasting memory.

256 descriptors does sound like enough, but what about the fragmented
skb case?  MAX_SKB_FRAGS is (64K/4K + 2) = 18, and each fragment gets
mapped to one descriptor.  It even gets worse with e1000 because we may
need to split a fragment into two fragments in the driver to workaround
hardware errata.  :-(

It would be interesting to see the frags:skb ratio for 2.6 with TSO
enabled and disabled with Rick's test.  So our effective number of
descriptors needs to be adjusted by that ratio.  I agree with David that
it's wasteful for the device driver to worry about more than
dev->tx_queue_len, but that's in skb units, not descriptor units.

On the other hand, if we're always running the descriptor ring near
empty, we've got other problems.  It seems to reason that it doesn't
matter how big the ring is if we're in that situation.  If the CPU can
overrun the device, expanding the queues between the CPU and the device
may help with bursts but gets you nothing for a sustained load.

I flunked that queuing theory class anyway, so what do I know?  Every
time I get stuck in a traffic slug on the freeway, I think about that
class.  Hey, that means my car is like an skb, so maybe longer roads
would help?  Not!

-scott

^ permalink raw reply	[flat|nested] 38+ messages in thread
[parent not found: <Pine.LNX.4.58.0405141430340.4622@fcat>]
[parent not found: <3F60DE5B.1010700@pobox.com>]
* [e1000 2.6 10/11] TxDescriptors -> 1024 default
@ 2003-09-09  3:14 Feldman, Scott
  2003-09-11 19:18 ` Jeff Garzik
  0 siblings, 1 reply; 38+ messages in thread
From: Feldman, Scott @ 2003-09-09  3:14 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, ricardoz


* Change the default number of Tx descriptors from 256 to 1024.
  Data from [ricardoz@us.ibm.com] shows it's easy to overrun
  the Tx desc queue.

-------------

diff -Nuarp linux-2.6.0-test4/drivers/net/e1000/e1000_param.c linux-2.6.0-test4/drivers/net/e1000.new/e1000_param.c
--- linux-2.6.0-test4/drivers/net/e1000/e1000_param.c	2003-08-22 16:57:59.000000000 -0700
+++ linux-2.6.0-test4/drivers/net/e1000.new/e1000_param.c	2003-09-08 09:13:12.000000000 -0700
@@ -63,9 +63,10 @@ MODULE_PARM_DESC(X, S);
 /* Transmit Descriptor Count
  *
  * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
- * Valid Range: 80-4096 for 82544
+ * Valid Range: 80-4096 for 82544 and newer
  *
- * Default Value: 256
+ * Default Value: 256 for 82542 and 82543 gigabit ethernet controllers
+ * Default Value: 1024 for 82544 and newer
  */
 
 E1000_PARAM(TxDescriptors, "Number of transmit descriptors");
@@ -73,7 +74,7 @@ E1000_PARAM(TxDescriptors, "Number of tr
 /* Receive Descriptor Count
  *
  * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
- * Valid Range: 80-4096 for 82544
+ * Valid Range: 80-4096 for 82544 and newer
  *
  * Default Value: 256
  */
@@ -200,6 +201,7 @@ E1000_PARAM(InterruptThrottleRate, "Inte
 #define MAX_TXD                      256
 #define MIN_TXD                       80
 #define MAX_82544_TXD               4096
+#define DEFAULT_82544_TXD           1024
 
 #define DEFAULT_RXD                  256
 #define MAX_RXD                      256
@@ -320,12 +322,15 @@ e1000_check_options(struct e1000_adapter
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Transmit Descriptors",
-			.err  = "using default of " __MODULE_STRING(DEFAULT_TXD),
-			.def  = DEFAULT_TXD,
 			.arg  = { .r = { .min = MIN_TXD }}
 		};
 		struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
+		opt.err = mac_type < e1000_82544 ?
+			"using default of " __MODULE_STRING(DEFAULT_TXD) :
+			"using default of " __MODULE_STRING(DEFAULT_82544_TXD);
+		opt.def = mac_type < e1000_82544 ?
+			DEFAULT_TXD : DEFAULT_82544_TXD;
 		opt.arg.r.max = mac_type < e1000_82544 ?
 			MAX_TXD : MAX_82544_TXD;
 

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2004-06-02 19:11 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-12  5:13 [e1000 2.6 10/11] TxDescriptors -> 1024 default Feldman, Scott
2003-09-12 12:44 ` jamal
2003-09-12 15:29   ` Donald Becker
2003-09-12 17:44     ` Ricardo C Gonzalez
2003-09-15 11:37     ` jamal
2003-09-12 18:12   ` Ben Greear
2003-09-12 18:31     ` Ricardo C Gonzalez
2003-09-15 11:29     ` jamal
     [not found] <Pine.LNX.4.58.0405141430340.4622@fcat>
2004-05-18 14:34 ` Ricardo C Gonzalez
2004-06-02 19:11   ` Marc Herbert
     [not found] <3F60DE5B.1010700@pobox.com>
2003-09-11 21:27 ` Ricardo C Gonzalez
  -- strict thread matches above, loose matches on Subject: below --
2003-09-09  3:14 Feldman, Scott
2003-09-11 19:18 ` Jeff Garzik
2003-09-11 19:45   ` Ben Greear
2003-09-11 19:59     ` Jeff Garzik
2003-09-11 20:12     ` David S. Miller
2003-09-11 20:40       ` Ben Greear
2003-09-11 21:07         ` David S. Miller
2003-09-11 21:29           ` Ben Greear
2003-09-11 21:29             ` David S. Miller
2003-09-11 21:47               ` Ricardo C Gonzalez
2003-09-11 22:00                 ` Jeff Garzik
2003-09-11 22:15               ` Ben Greear
2003-09-11 23:02                 ` David S. Miller
2003-09-11 23:22                   ` Ben Greear
2003-09-11 23:29                     ` David S. Miller
2003-09-12  1:34                     ` jamal
2003-09-12  2:20                       ` Ricardo C Gonzalez
2003-09-12  3:05                         ` jamal
2003-09-13  3:49                       ` David S. Miller
2003-09-13 11:52                         ` Robert Olsson
2003-09-15 12:12                           ` jamal
2003-09-15 13:45                             ` Robert Olsson
2003-09-15 23:15                               ` David S. Miller
2003-09-16  9:28                                 ` Robert Olsson
2003-09-14 19:08                         ` Ricardo C Gonzalez
2003-09-15  2:50                           ` David Brownell
2003-09-15  8:17                             ` David S. Miller

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).