Date: Thu, 23 Jan 2014 00:44:14 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261064 - stable/9/sys/rpc Message-ID: <201401230044.s0N0iEpF050976@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Jan 23 00:44:14 2014 New Revision: 261064 URL: http://svnweb.freebsd.org/changeset/base/261064 Log: 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. Modified: stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:43:33 2014 (r261063) +++ stable/9/sys/rpc/svc_vc.c Thu Jan 23 00:44:14 2014 (r261064) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401230044.s0N0iEpF050976>