Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/nfs Pull up revision 1.60 (requested by fvdl):
details: https://anonhg.NetBSD.org/src/rev/75d49f076b96
branches: netbsd-1-5
changeset: 490347:75d49f076b96
user: he <he%NetBSD.org@localhost>
date: Thu Dec 14 23:37:35 2000 +0000
description:
Pull up revision 1.60 (requested by fvdl):
Improve NFS performance, possibly with as much as 100% in
throughput. Please note: this implies a kernel interface change,
VOP_FSYNC gains two arguments.
diffstat:
sys/nfs/nfs_socket.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diffs (47 lines):
diff -r 9d02b25182bb -r 75d49f076b96 sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Thu Dec 14 23:37:33 2000 +0000
+++ b/sys/nfs/nfs_socket.c Thu Dec 14 23:37:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_socket.c,v 1.57 2000/06/09 00:00:17 fvdl Exp $ */
+/* $NetBSD: nfs_socket.c,v 1.57.2.1 2000/12/14 23:37:35 he Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -440,15 +440,29 @@
(struct mbuf *)0, flags);
if (error) {
if (rep) {
- log(LOG_INFO, "nfs send error %d for server %s\n",error,
- rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
- /*
- * Deal with errors for the client side.
- */
- if (rep->r_flags & R_SOFTTERM)
- error = EINTR;
- else
+ if (error == ENOBUFS && so->so_type == SOCK_DGRAM) {
+ /*
+ * We're too fast for the network/driver,
+ * and UDP isn't flowcontrolled.
+ * We need to resend. This is not fatal,
+ * just try again.
+ *
+ * Could be smarter here by doing some sort
+ * of a backoff, but this is rare.
+ */
rep->r_flags |= R_MUSTRESEND;
+ } else {
+ log(LOG_INFO, "nfs send error %d for %s\n",
+ error,
+ rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
+ /*
+ * Deal with errors for the client side.
+ */
+ if (rep->r_flags & R_SOFTTERM)
+ error = EINTR;
+ else
+ rep->r_flags |= R_MUSTRESEND;
+ }
} else
log(LOG_INFO, "nfsd send error %d\n", error);
Home |
Main Index |
Thread Index |
Old Index