svn commit: r260031 - head/sys/rpc
Alexander Motin
mav at FreeBSD.org
Sun Dec 29 03:43:26 UTC 2013
Author: mav
Date: Sun Dec 29 03:43:25 2013
New Revision: 260031
URL: http://svnweb.freebsd.org/changeset/base/260031
Log:
In addition to r259632 completely block receive upcalls if we have more
data than we need. This reduces lock pressure from xprt_active() side.
Modified:
head/sys/rpc/svc_vc.c
Modified: head/sys/rpc/svc_vc.c
==============================================================================
--- head/sys/rpc/svc_vc.c Sun Dec 29 03:15:15 2013 (r260030)
+++ head/sys/rpc/svc_vc.c Sun Dec 29 03:43:25 2013 (r260031)
@@ -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);
}
More information about the svn-src-head
mailing list