MFprojects/camlock r254460:

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.
This commit is contained in:
Alexander Motin 2013-08-24 14:41:49 +00:00
parent 5f4fc3dbcb
commit 596d33e923

View File

@ -620,7 +620,6 @@ taskqueue_member(struct taskqueue *queue, struct thread *td)
{
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, struct thread *td)
if (++j >= queue->tq_tcount)
break;
}
TQ_UNLOCK(queue);
return (ret);
}