freebsd4.11 patch for nfs over tcp
rick at snowhite.cis.uoguelph.ca
rick at snowhite.cis.uoguelph.ca
Mon Jul 24 14:55:41 UTC 2006
I figured that putting patches for FreeBSD4 in the bugtracker was passe,
so I'm posting it here.
I noticed that performance of nfs over TCP was abismal under certain
circumstances. It turned out that TCP_NODELAY wasn't being set, because
sopt_dir wasn't filled in.
Here's a simple diff -c patch, rick
ps: sopt_dir also isn't set for KEEPALIVE, but it doesn't matter for that one.
--- FreeBSD4.11 diff -c patch
*** nfs_socket.c.orig Mon Jul 24 10:37:45 2006
--- nfs_socket.c Mon Jul 24 10:38:39 2006
***************
*** 339,344 ****
--- 339,345 ----
bzero(&sopt, sizeof sopt);
sopt.sopt_level = IPPROTO_TCP;
+ sopt.sopt_dir = SOPT_SET;
sopt.sopt_name = TCP_NODELAY;
sopt.sopt_val = &val;
sopt.sopt_valsize = sizeof val;
*** nfs_syscalls.c.orig Mon Jul 24 10:37:57 2006
--- nfs_syscalls.c Mon Jul 24 10:39:12 2006
***************
*** 376,381 ****
--- 376,382 ----
bzero(&sopt, sizeof sopt);
sopt.sopt_level = IPPROTO_TCP;
+ sopt.sopt_dir = SOPT_SET;
sopt.sopt_name = TCP_NODELAY;
sopt.sopt_val = &val;
sopt.sopt_valsize = sizeof val;
More information about the freebsd-fs
mailing list