On Sun, Aug 06, 2006 at 12:26:44AM -0700, David Miller wrote: > > Increasingly I find that orphan'ing an SKB once it hits the real > device for transmit is something to seriously consider.
Yes that certainly makes a lot of sense. Actually, why do we charge the memory to the socket at all between the packet leaving the TCP stack and it entering the device? Most packets spend a tiny amount of time on this journey so it seems silly to do atomic operations as they leave the stack only to undo it when they enter the device. The biggest reason packets spend a non-trivial amount of time on this journey is traffic shaping. In that case the memory is already accounted to the device anyway (in terms of queue length) so it would seem unfair to charge the socket as well. So how about simply charging the socket for the retransmit queue as we do now and skip the caharge for packets leaving the stack? For UDP it's different since it doesn't have a retransmit queue. However, I'm unsure how much of a positive effect the socket charge actually has for UDP. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html