netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [e1000]: Remove unnecessary tx_lock
@ 2006-08-03 13:15 jamal
  2006-08-03 14:02 ` Herbert Xu
  0 siblings, 1 reply; 85+ messages in thread
From: jamal @ 2006-08-03 13:15 UTC (permalink / raw)
  To: jesse.brandeburg, Auke Kok; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]


There is no need for tx_locking if you are already netif stopped
(transmit path will never be entered).
With this change under high speed forwarding i see anywhere
between 2-4Kpps improvement on a 2 CPU environment with twoo e1000s tied
to different CPUs forwarding between each other. Actually the
performance improvement should be attributed to the use of
TX_WAKE_THRESHOLD - more drivers should use that technique.

cheers,
jamal

signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>

-----


[-- Attachment #2: e1000_wq --]
[-- Type: text/x-patch, Size: 631 bytes --]

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index da62db8..559e334 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3517,11 +3517,8 @@ #endif
 #define TX_WAKE_THRESHOLD 32
 	if (unlikely(cleaned && netif_queue_stopped(netdev) &&
 	             netif_carrier_ok(netdev))) {
-		spin_lock(&tx_ring->tx_lock);
-		if (netif_queue_stopped(netdev) &&
-		    (E1000_DESC_UNUSED(tx_ring) >= TX_WAKE_THRESHOLD))
+		if (E1000_DESC_UNUSED(tx_ring) >= TX_WAKE_THRESHOLD)
 			netif_wake_queue(netdev);
-		spin_unlock(&tx_ring->tx_lock);
 	}
 
 	if (adapter->detect_tx_hung) {

^ permalink raw reply related	[flat|nested] 85+ messages in thread
* RE: [PATCH] [e1000]: Remove unnecessary tx_lock
@ 2006-08-08  5:43 Brandeburg, Jesse
  0 siblings, 0 replies; 85+ messages in thread
From: Brandeburg, Jesse @ 2006-08-08  5:43 UTC (permalink / raw)
  To: hadi
  Cc: Edgar E. Iglesias, Jesse Brandeburg, Herbert Xu, David Miller,
	shemminger, mchan, Kok, Auke-jan H, netdev

> -----Original Message-----
> From: jamal [mailto:hadi@cyberus.ca]
> On Mon, 2006-07-08 at 13:53 -0700, Brandeburg, Jesse wrote:
> 
> > we don't enable it right now, but you could use the TXQE (tx queue
> empty)
> > interrupt to avoid the starvation case.  I think it might flood you
with
> > TXQE interrupts however, so we'd probably have to figure out some
way to
> > turn it on occasionally.
> >
> 
> I think it may make sense to set on netif_stop and reset on wake. I
take
> it "empty" means all the descriptors for sending are gone?

We can try it.  Empty means that the adapter has completed all transmit
work and has no more to do (register TDH == TDT)

Jesse

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

end of thread, other threads:[~2006-08-09  1:25 UTC | newest]

Thread overview: 85+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 13:15 [PATCH] [e1000]: Remove unnecessary tx_lock jamal
2006-08-03 14:02 ` Herbert Xu
2006-08-03 14:24   ` jamal
2006-08-03 16:36   ` Brandeburg, Jesse
2006-08-03 18:05     ` Michael Chan
2006-08-03 22:08       ` jamal
2006-08-04  0:09         ` Michael Chan
2006-08-04  1:10           ` Herbert Xu
2006-08-04  8:37             ` Herbert Xu
2006-08-04 10:10               ` Herbert Xu
2006-08-04 10:16                 ` jamal
2006-08-04 10:25                   ` Herbert Xu
2006-08-04 10:45                     ` jamal
2006-08-05 23:04                     ` jamal
2006-08-05 23:06                       ` Herbert Xu
2006-08-05 23:21                         ` jamal
2006-08-05 23:30                           ` Herbert Xu
2006-08-05 16:45                   ` jamal
2006-08-04 17:12                 ` Stephen Hemminger
2006-08-04 17:28                 ` Michael Chan
2006-08-04 18:08                   ` Stephen Hemminger
2006-08-04 23:31                     ` David Miller
2006-08-05 16:56                       ` jamal
2006-08-05 23:05                         ` Herbert Xu
2006-08-05 23:17                           ` jamal
2006-08-05 23:19                             ` Herbert Xu
2006-08-05 23:36                               ` jamal
2006-08-06  2:51                                 ` Herbert Xu
2006-08-06  7:14                                   ` Edgar E. Iglesias
2006-08-06  7:24                                     ` Herbert Xu
2006-08-06  7:30                                       ` Edgar E. Iglesias
2006-08-06  7:26                                     ` David Miller
2006-08-06  7:36                                       ` Herbert Xu
2006-08-06  8:06                                         ` Edgar E. Iglesias
2006-08-06  8:27                                           ` Herbert Xu
2006-08-06  9:03                                             ` Edgar E. Iglesias
2006-08-06  9:10                                               ` Herbert Xu
2006-08-06  9:18                                                 ` Edgar E. Iglesias
2006-08-06  8:35                                         ` David Miller
2006-08-06 12:24                                   ` jamal
2006-08-06 12:33                                     ` jamal
2006-08-06 23:16                                       ` Jesse Brandeburg
2006-08-07 12:50                                         ` jamal
2006-08-07 15:21                                           ` Edgar E. Iglesias
2006-08-07 15:40                                             ` jamal
2006-08-07 15:59                                               ` Edgar E. Iglesias
2006-08-07 16:31                                                 ` Jamal Hadi Salim
2006-08-07 17:04                                                   ` Edgar E. Iglesias
2006-08-07 18:00                                                     ` jamal
2006-08-07 18:47                                                       ` Edgar E. Iglesias
2006-08-07 19:03                                                         ` jamal
2006-08-07 19:14                                                           ` Edgar E. Iglesias
2006-08-07 19:34                                                             ` jamal
2006-08-07 20:28                                                               ` Edgar E. Iglesias
2006-08-08  0:52                                                                 ` jamal
2006-08-07 20:53                                                           ` Brandeburg, Jesse
2006-08-08  1:07                                                             ` jamal
2006-08-07 23:23                                                           ` Herbert Xu
2006-08-07 23:35                                                             ` Brandeburg, Jesse
2006-08-07 23:40                                                               ` Herbert Xu
2006-08-07 16:29                                               ` Edgar E. Iglesias
2006-08-07 16:36                                                 ` jamal
2006-08-06 19:22                                     ` jamal
2006-08-08  1:19                                     ` jamal
2006-08-08  1:22                                       ` Herbert Xu
2006-08-08  1:33                                         ` jamal
2006-08-08  2:17                                           ` Herbert Xu
2006-08-08  3:10                                             ` jamal
2006-08-08 12:21                                   ` jamal
2006-08-08 12:39                                     ` Herbert Xu
2006-08-06 17:20                           ` Michael Chan
2006-08-06 23:04                             ` Herbert Xu
2006-08-07  3:56                               ` Michael Chan
2006-08-07  4:21                                 ` Herbert Xu
2006-08-08 17:04                       ` Benjamin LaHaise
2006-08-08 22:06                         ` David Miller
2006-08-08 23:21                           ` Benjamin LaHaise
2006-08-09  0:25                             ` Herbert Xu
2006-08-09  1:25                               ` Benjamin LaHaise
2006-08-04  1:16           ` jamal
2006-08-04  1:18             ` Herbert Xu
2006-08-04  1:25               ` jamal
2006-08-04  4:06             ` Michael Chan
2006-08-03 22:06     ` jamal
  -- strict thread matches above, loose matches on Subject: below --
2006-08-08  5:43 Brandeburg, Jesse

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