netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: at91_ether.c - Allow transmitter interrupt to be handled first in ISR
@ 2010-01-13 17:25 James Kosin
  2010-01-14  1:32 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: James Kosin @ 2010-01-13 17:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linux Netdev List, Eric Dumazet

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

Ok,

This is an optimization to:

  Allow the transmitter to free the skb before the receiver allocates
many skbs from the system.  This should help with skb reuse and in
multi-core ARM systems allow the next transmitter to be started while we
service the receiver DMA blocks.

  This first patch is only a move of the service of the transmitter
interrupt to be first in the ISR.  This is not expensive; because the
transmitter queue to the MAC is only (1) one deep, and the receiver is
currently (9) nine deep.

James Kosin


[-- Attachment #2: ether_patch_1.patch --]
[-- Type: application/octet-stream, Size: 874 bytes --]

--- C:/Documents and Settings/jkosin/My Documents/junk/kernel/Copy of linux-2.6.31.5/drivers/net/arm/at91_ether.c	Thu Oct 22 18:57:56 2009
+++ C:/Documents and Settings/jkosin/My Documents/junk/kernel/linux-2.6.31.5/drivers/net/arm/at91_ether.c	Wed Jan 13 12:05:39 2010
@@ -925,9 +925,6 @@
 	   It is automatically cleared once read. */
 	intstatus = at91_emac_read(AT91_EMAC_ISR);
 
-	if (intstatus & AT91_EMAC_RCOM)		/* Receive complete */
-		at91ether_rx(dev);
-
 	if (intstatus & AT91_EMAC_TCOM) {	/* Transmit complete */
 		/* The TCOM bit is set even if the transmission failed. */
 		if (intstatus & (AT91_EMAC_TUND | AT91_EMAC_RTRY))
@@ -940,6 +937,9 @@
 		}
 		netif_wake_queue(dev);
 	}
+
+	if (intstatus & AT91_EMAC_RCOM)		/* Receive complete */
+		at91ether_rx(dev);
 
 	/* Work-around for Errata #11 */
 	if (intstatus & AT91_EMAC_RBNA) {

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

end of thread, other threads:[~2010-01-15  5:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 17:25 [PATCH 1/2] net: at91_ether.c - Allow transmitter interrupt to be handled first in ISR James Kosin
2010-01-14  1:32 ` David Miller
2010-01-14  1:40   ` netdev: patchwork.ozlabs.org vs patchwork.kernel.org ? Joe Perches
2010-01-14  1:41     ` David Miller
2010-01-14  1:49       ` Joe Perches
2010-01-14 20:28   ` [PATCH 1/2] net: at91_ether.c - Allow transmitter interrupt to be handled first in ISR James Kosin
2010-01-15  5:38     ` Eric Dumazet

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