From owner-svn-src-all@FreeBSD.ORG Mon Jun 23 13:10:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0543865; Mon, 23 Jun 2014 13:10:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7098325CA; Mon, 23 Jun 2014 13:10:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5NDAoAA025021; Mon, 23 Jun 2014 13:10:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5NDAoTl025019; Mon, 23 Jun 2014 13:10:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406231310.s5NDAoTl025019@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Jun 2014 13:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267787 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 13:10:50 -0000 Author: mav Date: Mon Jun 23 13:10:49 2014 New Revision: 267787 URL: http://svnweb.freebsd.org/changeset/base/267787 Log: MFC r267223: Remove st_idle variable, duplicating st_xprt. Modified: stable/9/sys/rpc/svc.c stable/9/sys/rpc/svc.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Mon Jun 23 13:09:49 2014 (r267786) +++ stable/9/sys/rpc/svc.c Mon Jun 23 13:10:49 2014 (r267787) @@ -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; @@ -1140,7 +1139,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, @@ -1148,10 +1146,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: stable/9/sys/rpc/svc.h ============================================================================== --- stable/9/sys/rpc/svc.h Mon Jun 23 13:09:49 2014 (r267786) +++ stable/9/sys/rpc/svc.h Mon Jun 23 13:10:49 2014 (r267787) @@ -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 */