udp: Don't save dst in udpv6_sendmsg()
Subsystems (3)
RFC PATCH 1/1 udp: Don't save dst in udpv6_sendmsg()
From: Krishna Kumar <[email protected]>
Since ip6_datagram_connect saves the dst entry, it is not required to do the same in every iteration of udpv6_sendmsg. It also breaks the txq# caching, which then gets updated every time in dev_pick_tx only to get reset again here. Update dst only if ip6_sk_dst_lookup changed the dst entry.
Performance: I ran netperf UDPv6 RR to use connected sockets. Tested with a 70 min run, aggregate of 5 netperf runs for each result.
------------------------ UDPv6 RR Test ---------------------
#procs Org TPS New TPS (%) Org SD New SD (%)
--------------------------------------------------------------
1 119031 118793 (-0.19) 82 77 (-5.23) 2 217572 218607 (0.47) 315 300 (-4.65) 4 258463 258823 (0.13) 1334 1248 (-6.44) 8 318018 319425 (0.44) 5735 5500 (-4.09) 10 395531 401529 (1.51) 9901 9507 (-3.98) 12 453319 453492 (0.03) 15473 15131 (-2.21)
--------------------------------------------------------------
--- net/ipv6/udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv6/udp.c +2 -1
@@ -990,7 +990,8 @@ do_append_data:if (dst) {if (connected) { -ip6_dst_store (sk, dst, +if (__sk_dst_get (sk) != dst) +ip6_dst_store (sk, dst,ipv6_addr_equal (&fl.fl6_dst, &np->daddr) ? &np->daddr :NULL , #ifdef CONFIG_IPV6_SUBTREES
David Miller
maintainerFrom: Krishna Kumar <[email protected]>
Date: Fri, 23 Oct 2009 16:43:36 +0530
Quoted 3 lines
Performance: I ran netperf UDPv6 RR to use connected sockets. Tested with a 70 min run, aggregate of 5 netperf runs for each result.
Who actually uses connected UDP sockets? :-)
David Miller wrote on 10/24/2009 07:10:10 PM:
Quoted 6 lines
Quoted 4 lines
Performance: I ran netperf UDPv6 RR to use connected sockets. Tested with a 70 min run, aggregate of 5 netperf runs for each result.
Who actually uses connected UDP sockets? :-)
Just something I found when running netperf RR tests, and the code is there doing it anyway. Maybe I can drop doing this testing, but upto you.
Thanks,
- KK
David Miller
maintainerFrom: Krishna Kumar2 <[email protected]>
Date: Sat, 24 Oct 2009 19:15:46 +0530
Quoted 10 lines
David Miller wrote on 10/24/2009 07:10:10 PM:
Quoted 6 lines
Quoted 4 lines
Performance: I ran netperf UDPv6 RR to use connected sockets. Tested with a 70 min run, aggregate of 5 netperf runs for each result.
Who actually uses connected UDP sockets? :-)
Just something I found when running netperf RR tests, and the code is there doing it anyway. Maybe I can drop doing this testing, but upto you.
Eric Dumazet or someone else made comments recently about how nobody uses connected UDP sockets.
And if someone actually does, they can complain and we can go back to looking into it :-)
David Miller <[email protected]> wrote on 10/24/2009 07:19:15 PM:
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Who actually uses connected UDP sockets? :-)
Just something I found when running netperf RR tests, and the code is
there
Quoted 7 lines
Quoted 1 line
doing it anyway. Maybe I can drop doing this testing, but upto you.
Eric Dumazet or someone else made comments recently about how nobody uses connected UDP sockets.
And if someone actually does, they can complain and we can go back to looking into it :-)
Agreed. Please drop it.
Thanks,
- KK
Quoted 10 lines · David Miller
From: Krishna Kumar <[email protected]>
Date: Fri, 23 Oct 2009 16:43:36 +0530Quoted 3 lines
Performance: I ran netperf UDPv6 RR to use connected sockets. Tested with a 70 min run, aggregate of 5 netperf runs for each result.
Who actually uses connected UDP sockets? :-)
Somebody must, they sent me patches to optionally connect() the endpoints in a UDP_RR test :)
rick jones
trying to decide if he should by default set SO_DONTROUTE on UDP sockets to cover the backsides of testers who cause link-down events on devices under test with systems connected to their employer's site lans with the default route pointing at same...