diff options
author | mav <mav@FreeBSD.org> | 2013-08-24 14:41:49 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-08-24 14:41:49 +0000 |
commit | 8d8ac3d3c9671918b750794be8b7227ed242d633 (patch) | |
tree | 52fb22c0dcb3d23464fead1770610fbb14507794 | |
parent | 413bf347cd8d75b5cc702edaa5b26ae8b14c9f6b (diff) | |
download | FreeBSD-src-8d8ac3d3c9671918b750794be8b7227ed242d633.zip FreeBSD-src-8d8ac3d3c9671918b750794be8b7227ed242d633.tar.gz |
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.
-rw-r--r-- | sys/kern/subr_taskqueue.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index 521a5b1..9c7bf41 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -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); } |