svn commit: r254460 - projects/camlock/sys/kern
Alexander Motin
mav at FreeBSD.org
Sat Aug 17 18:38:01 UTC 2013
Author: mav
Date: Sat Aug 17 18:38:00 2013
New Revision: 254460
URL: http://svnweb.freebsd.org/changeset/base/254460
Log:
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:
projects/camlock/sys/kern/subr_taskqueue.c
Modified: projects/camlock/sys/kern/subr_taskqueue.c
==============================================================================
--- projects/camlock/sys/kern/subr_taskqueue.c Sat Aug 17 17:23:42 2013 (r254459)
+++ projects/camlock/sys/kern/subr_taskqueue.c Sat Aug 17 18:38:00 2013 (r254460)
@@ -620,7 +620,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;
@@ -631,6 +630,5 @@ taskqueue_member(struct taskqueue *queue
if (++j >= queue->tq_tcount)
break;
}
- TQ_UNLOCK(queue);
return (ret);
}
More information about the svn-src-projects
mailing list