]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Wed, 14 Oct 2015 11:23:20 +0000 (07:23 -0400)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 21 Oct 2015 16:08:19 +0000 (09:08 -0700)
Orabug: 22012202

Backport of upstream commit 1edd6a14d24f ("RDS-TCP: Do not bloat
sndbuf/rcvbuf in rds_tcp_tune")

Using the value of RDS_TCP_DEFAULT_BUFSIZE (128K)
clobbers efficient use of TSO because it inflates the size_goal
that is computed in tcp_sendmsg/tcp_sendpage and skews packet
latency, and the default values for these parameters actually
results in significantly better performance.

In request-response tests using rds-stress with a packet size of
100K with 16 threads (test parameters -q 100000 -a 256 -t16 -d16)
between a single pair of IP addresses achieves a throughput of
6-8 Gbps. Without this patch, throughput maxes at 2-3 Gbps under
equivalent conditions on these platforms.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/tcp.c

index 3011d4a305e3a7ec86b71a1ba2eb4aca0564c4f9..28461fc9e7938bd75680e2f7649244e9e9ce51a0 100644 (file)
@@ -65,21 +65,13 @@ void rds_tcp_nonagle(struct socket *sock)
        set_fs(oldfs);
 }
 
+/* All module specific customizations to the RDS-TCP socket should be done in
+ * rds_tcp_tune() and applied after socket creation. In general these
+ * customizations should be tunable via module_param()
+ */
 void rds_tcp_tune(struct socket *sock)
 {
-       struct sock *sk = sock->sk;
-
        rds_tcp_nonagle(sock);
-
-       /*
-        * We're trying to saturate gigabit with the default,
-        * see svc_sock_setbufsize().
-        */
-       lock_sock(sk);
-       sk->sk_sndbuf = RDS_TCP_DEFAULT_BUFSIZE;
-       sk->sk_rcvbuf = RDS_TCP_DEFAULT_BUFSIZE;
-       sk->sk_userlocks |= SOCK_SNDBUF_LOCK|SOCK_RCVBUF_LOCK;
-       release_sock(sk);
 }
 
 u32 rds_tcp_snd_nxt(struct rds_tcp_connection *tc)