[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081124.155531.135918197.davem@davemloft.net>
Date: Mon, 24 Nov 2008 15:55:31 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: andi@...stfloor.org, netdev@...r.kernel.org, minyard@....org,
christian@...i.com
Subject: Re: [PATCH] net: avoid a pair of dst_hold()/dst_release() in
ip_append_data()
From: Eric Dumazet <dada1@...mosbay.com>
Date: Mon, 24 Nov 2008 12:24:53 +0100
> [PATCH] net: avoid a pair of dst_hold()/dst_release() in ip_append_data()
>
> We can reduce pressure on dst entry refcount that slowdown UDP transmit
> path on SMP machines. This pressure is visible on RTP servers when
> delivering content to mediagateways, especially big ones, handling
> thousand of streams. Several cpus send UDP frames to the same
> destination, hence use the same dst entry.
>
> This patch makes ip_append_data() eventually steal the refcount its
> callers had to take on the dst entry.
>
> This doesnt avoid all refcounting, but still gives speedups on SMP,
> on UDP/RAW transmit path
>
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
Ok, this looks fine to me, thanks Eric. Although as you know
I'm not a big fan of pass by reference arguments :-)
Thinking more I believe we can do similar tricks for all TCP
transmit traffic.
Packets bound to sockets never outlive those sockets (and thus
their cached routes) unless we skb_orphan().
The only not covered case is where the socket cached route
is reset or changed. We could defer the dst put until the
transmit queue reaches a certain point, kind of like a retransmit
queue RCU :-)
Just some ideas...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists