summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-12-29 03:43:25 +0000
committermav <mav@FreeBSD.org>2013-12-29 03:43:25 +0000
commit6ab680bb65a144b9f95b93ecb6acc9e1ae617204 (patch)
tree9e4ffcc1bfe9dbe6b4f2169c3267f7de2a1691fd /sys/rpc
parent18470155f6c486752b02571fbe6e1f0adef56992 (diff)
downloadFreeBSD-src-6ab680bb65a144b9f95b93ecb6acc9e1ae617204.zip
FreeBSD-src-6ab680bb65a144b9f95b93ecb6acc9e1ae617204.tar.gz
In addition to r259632 completely block receive upcalls if we have more
data than we need. This reduces lock pressure from xprt_active() side.
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/svc_vc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index 988b487..f9ff0e6 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -619,7 +619,15 @@ svc_vc_process_pending(SVCXPRT *xprt)
}
}
- so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2));
+ /*
+ * Block receive upcalls if we have more data pending,
+ * otherwise report our need.
+ */
+ if (cd->mpending)
+ so->so_rcv.sb_lowat = INT_MAX;
+ else
+ so->so_rcv.sb_lowat =
+ imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2));
return (TRUE);
}
OpenPOWER on IntegriCloud