Date: Sun, 8 Jun 2014 10:18:22 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267223 - head/sys/rpc Message-ID: <201406081018.s58AIMaO084916@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Jun 8 10:18:22 2014 New Revision: 267223 URL: http://svnweb.freebsd.org/changeset/base/267223 Log: Remove st_idle variable, duplicating st_xprt. MFC after: 2 weeks Modified: head/sys/rpc/svc.c head/sys/rpc/svc.h Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Sun Jun 8 09:49:42 2014 (r267222) +++ head/sys/rpc/svc.c Sun Jun 8 10:18:22 2014 (r267223) @@ -340,7 +340,6 @@ xprt_assignthread(SVCXPRT *xprt) st = LIST_FIRST(&pool->sp_idlethreads); if (st) { LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; SVC_ACQUIRE(xprt); xprt->xp_thread = st; st->st_xprt = xprt; @@ -1138,7 +1137,6 @@ svc_run_internal(SVCPOOL *pool, bool_t i } LIST_INSERT_HEAD(&pool->sp_idlethreads, st, st_ilink); - st->st_idle = TRUE; if (ismaster || (!ismaster && pool->sp_threadcount > pool->sp_minthreads)) error = cv_timedwait_sig(&st->st_cond, @@ -1146,10 +1144,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i else error = cv_wait_sig(&st->st_cond, &pool->sp_lock); - if (st->st_idle) { + if (st->st_xprt == NULL) LIST_REMOVE(st, st_ilink); - st->st_idle = FALSE; - } /* * Reduce worker thread count when idle. Modified: head/sys/rpc/svc.h ============================================================================== --- head/sys/rpc/svc.h Sun Jun 8 09:49:42 2014 (r267222) +++ head/sys/rpc/svc.h Sun Jun 8 10:18:22 2014 (r267223) @@ -295,7 +295,6 @@ typedef struct __rpc_svcthread { struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406081018.s58AIMaO084916>