Thread (15 messages) flat view 15 messages, 4 authors, 2010-02-17

Re: [PATCH 4/4] Staging: Octeon: Free transmit SKBs in a timely manner.

From: David Daney <hidden>
Date: 2010-02-15 20:41:08
Also in: linux-mips

On 02/15/2010 12:27 PM, Eric Dumazet wrote:
Le lundi 15 février 2010 à 12:13 -0800, David Daney a écrit :
quoted
If we wait for the once-per-second cleanup to free transmit SKBs,
sockets with small transmit buffer sizes might spend most of their
time blocked waiting for the cleanup.

Normally we do a cleanup for each transmitted packet.  We add a
watchdog type timer so that we also schedule a timeout for 150uS after
a packet is transmitted.  The watchdog is reset for each transmitted
packet, so for high packet rates, it never expires.  At these high
rates, the cleanups are done for each packet so the extra watchdog
initiated cleanups are not needed.
s/needed/fired/
or perhaps s/are not needed/are neither needed nor fired/
Hmm, but re-arming a timer for each transmited packet must have a cost ?
The cost is fairly low (less than 10 processor clock cycles).  We didn't 
add this for amusement, people actually do things like only send UDP 
packets from userspace.  Since we can fill the transmit queue faster 
than it is emptied, the socket transmit buffer is quickly consumed.  If 
we don't free the SKBs in short order, the transmitting process get to 
take a long sleep (until our previous once per second clean up task was 
run).
quoted
Signed-off-by: David Daney<redacted>
Is there any particular reason periodic is spelled preiodic ?
Ha!  No good reason.  I will correct the spelling.

Thanks,
David Daney

quoted
---
  }

-static void cvm_oct_tx_clean_worker(struct work_struct *work)
+static void cvm_oct_preiodic_worker(struct work_struct *work)
  {

quoted
-			INIT_DELAYED_WORK(&priv->tx_clean_work,
-					  cvm_oct_tx_clean_worker);
-
+			INIT_DELAYED_WORK(&priv->port_periodic_work,
+					  cvm_oct_preiodic_worker);

  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help