Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: add mount parameter tcpnodelay

Although corking and uncorking the socket (which cifs.ko already
does) should usually have the desired benefit, using the new
tcpnodelay mount option causes tcp_sock_set_nodelay() to be set
on the socket which may be useful in order to ensure that we don't
ever have cases where the network stack is waiting on sending an
SMB request until multiple SMB requests have been added to the
send queue (since this could lead to long latencies).

To enable it simply append "tcpnodelay" it to the mount options

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>

+9
+8
fs/cifs/fs_context.c
··· 116 116 fsparam_flag("nosharesock", Opt_nosharesock), 117 117 fsparam_flag_no("persistenthandles", Opt_persistent), 118 118 fsparam_flag_no("resilienthandles", Opt_resilient), 119 + fsparam_flag_no("tcpnodelay", Opt_tcp_nodelay), 119 120 fsparam_flag("domainauto", Opt_domainauto), 120 121 fsparam_flag("rdma", Opt_rdma), 121 122 fsparam_flag("modesid", Opt_modesid), ··· 1389 1388 goto cifs_parse_mount_err; 1390 1389 } 1391 1390 } 1391 + break; 1392 + case Opt_tcp_nodelay: 1393 + /* tcp nodelay should not usually be needed since we CORK/UNCORK the socket */ 1394 + if (result.negated) 1395 + ctx->sockopt_tcp_nodelay = false; 1396 + else 1397 + ctx->sockopt_tcp_nodelay = true; 1392 1398 break; 1393 1399 case Opt_domainauto: 1394 1400 ctx->domainauto = true;
+1
fs/cifs/fs_context.h
··· 98 98 Opt_nosharesock, 99 99 Opt_persistent, 100 100 Opt_resilient, 101 + Opt_tcp_nodelay, 101 102 Opt_domainauto, 102 103 Opt_rdma, 103 104 Opt_modesid,