On Fri, Dec 20, 2013 at 05:39:07PM +0000, Alexander Motin wrote: > Author: mav > Date: Fri Dec 20 17:39:07 2013 > New Revision: 259659 > URL: http://svnweb.freebsd.org/changeset/base/259659 > > Log: > Remove several linear list traversals per request from RPC server code. > > Do not insert active ports into pool->sp_active list if they are success- > fully assigned to some thread. This makes that list include only ports that > really require attention, and so traversal can be reduced to simple taking > the first one. > > Remove idle thread from pool->sp_idlethreads list when assigning some > work (port of requests) to it. That again makes possible to replace list > traversals with simple taking the first element. > > Modified: > head/sys/nfs/nfs_fha.c > head/sys/rpc/svc.c > head/sys/rpc/svc.h
FYI. cc -c -O -pipe -march=core2 -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror /usr/src/sys/rpc/svc.c /usr/src/sys/rpc/svc.c:296:20: error: no member named 'xp_mlock' in 'struct __rpc_svcxprt'; did you mean 'xp_lock'? mtx_assert(&xprt->xp_mlock, MA_OWNED); ^ /usr/src/sys/sys/mutex.h:379:15: note: expanded from macro 'mtx_assert' mtx_assert_((m), (what), __FILE__, __LINE__) ^ /usr/src/sys/sys/mutex.h:359:15: note: expanded from macro 'mtx_assert_' _mtx_assert((m), (what), (file), (line)) ^ /usr/src/sys/sys/mutex.h:158:17: note: expanded from macro '_mtx_assert' __mtx_assert(&(m)->mtx_lock, w, f, l) ^ /usr/src/sys/rpc/svc.h:149:12: note: 'xp_lock' declared here struct sx xp_lock; ^ /usr/src/sys/rpc/svc.c:296:2: error: no member named 'mtx_lock' in 'struct sx'; did you mean 'sx_lock'? mtx_assert(&xprt->xp_mlock, MA_OWNED); ^ /usr/src/sys/sys/mutex.h:379:2: note: expanded from macro 'mtx_assert' mtx_assert_((m), (what), __FILE__, __LINE__) ^ /usr/src/sys/sys/mutex.h:359:2: note: expanded from macro 'mtx_assert_' _mtx_assert((m), (what), (file), (line)) ^ /usr/src/sys/sys/mutex.h:158:21: note: expanded from macro '_mtx_assert' __mtx_assert(&(m)->mtx_lock, w, f, l) ^ /usr/src/sys/sys/_sx.h:39:21: note: 'sx_lock' declared here volatile uintptr_t sx_lock; -- steve _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"