netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Kumar <krkumar2@in.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Krishna Kumar <krkumar2@in.ibm.com>
Subject: [RFC] [PATCH] udp: Don't save dst in udpv6_sendmsg()
Date: Fri, 23 Oct 2009 16:43:36 +0530	[thread overview]
Message-ID: <20091023111336.4733.4901.sendpatchset@localhost.localdomain> (raw)

From: Krishna Kumar <krkumar2@in.ibm.com>

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

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
 net/ipv6/udp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -ruNp org/net/ipv6/udp.c new/net/ipv6/udp.c
--- org/net/ipv6/udp.c	2009-10-19 11:58:16.000000000 +0530
+++ new/net/ipv6/udp.c	2009-10-23 10:42:35.000000000 +0530
@@ -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

             reply	other threads:[~2009-10-23 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 11:13 Krishna Kumar [this message]
2009-10-24 13:40 ` [RFC] [PATCH] udp: Don't save dst in udpv6_sendmsg() David Miller
2009-10-24 13:45   ` Krishna Kumar2
2009-10-24 13:49     ` David Miller
2009-10-24 14:00       ` Krishna Kumar2
2009-10-26 16:45   ` Rick Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091023111336.4733.4901.sendpatchset@localhost.localdomain \
    --to=krkumar2@in.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).