Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Nov 2013 15:41:55 +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: r258225 - stable/9/sys/kern
Message-ID:  <201311161541.rAGFfthQ061568@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Nov 16 15:41:54 2013
New Revision: 258225
URL: http://svnweb.freebsd.org/changeset/base/258225

Log:
  MFC r254787:
  Remove locking from taskqueue_member().  The list of threads is static
  during the taskqueue life cycle, so there is no need to protect it,
  taking quite congested lock several more times for each ZFS I/O.

Modified:
  stable/9/sys/kern/subr_taskqueue.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/subr_taskqueue.c
==============================================================================
--- stable/9/sys/kern/subr_taskqueue.c	Sat Nov 16 15:34:14 2013	(r258224)
+++ stable/9/sys/kern/subr_taskqueue.c	Sat Nov 16 15:41:54 2013	(r258225)
@@ -577,7 +577,6 @@ taskqueue_member(struct taskqueue *queue
 {
 	int i, j, ret = 0;
 
-	TQ_LOCK(queue);
 	for (i = 0, j = 0; ; i++) {
 		if (queue->tq_threads[i] == NULL)
 			continue;
@@ -588,6 +587,5 @@ taskqueue_member(struct taskqueue *queue
 		if (++j >= queue->tq_tcount)
 			break;
 	}
-	TQ_UNLOCK(queue);
 	return (ret);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311161541.rAGFfthQ061568>