diff options
author | mav <mav@FreeBSD.org> | 2014-01-22 23:50:13 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-01-22 23:50:13 +0000 |
commit | ec416d0ab84b2e916ae2498d35cf43ef91370909 (patch) | |
tree | 01efe712e8ceb388ce75753357a61bb08c6f82e6 /sys | |
parent | 2d67ee21c012e6025b1517e268cf2fbf5eef2c03 (diff) | |
download | FreeBSD-src-ec416d0ab84b2e916ae2498d35cf43ef91370909.zip FreeBSD-src-ec416d0ab84b2e916ae2498d35cf43ef91370909.tar.gz |
MFC r260031:
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')
-rw-r--r-- | sys/rpc/svc_vc.c | 10 |
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); } |