svn commit: r258225 - stable/9/sys/kern

Alexander Motin mav at FreeBSD.org
Sat Nov 16 15:41:55 UTC 2013


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);
 }


More information about the svn-src-stable-9 mailing list