From owner-svn-src-head@FreeBSD.ORG Sat Dec 21 07:09:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CACBE26C; Sat, 21 Dec 2013 07:09:19 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD0DB1EDF; Sat, 21 Dec 2013 07:09:19 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id rBL79784057651; Fri, 20 Dec 2013 23:09:07 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id rBL797JA057650; Fri, 20 Dec 2013 23:09:07 -0800 (PST) (envelope-from sgk) Date: Fri, 20 Dec 2013 23:09:07 -0800 From: Steve Kargl To: Alexander Motin Subject: Re: svn commit: r259659 - in head/sys: nfs rpc Message-ID: <20131221070907.GA57639@troutmask.apl.washington.edu> References: <201312201739.rBKHd73M059252@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312201739.rBKHd73M059252@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2013 07:09:20 -0000 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