]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r265689:
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 24 May 2014 10:44:40 +0000 (10:44 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 24 May 2014 10:44:40 +0000 (10:44 +0000)
commit11cdb48076715c5d729ce1deacb78fc0780828b9
treec92ed7ac61f9be9d558670b53fac292267283eb2
parentef7e7f23aa9b091387196feb03dc47204ade8e6a
MFC r265689:
Import adapted OpenSolaris' thread pool API implementation.

The thread pool is used by libzfs to implement parallel disk scanning.
Without this change our dummy wrapper made `zpool import ZZZ` command to
scan all disks sequentially from the single thread when searching for pools.
This change makes it use two threads per CPU, same as in OpenSolaris.

On system with 200 HDDs this change reduces ZFS pool import time from 35
to 22 seconds.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cddl/compat/opensolaris/include/thread_pool.h
cddl/compat/opensolaris/misc/thread_pool.c [new file with mode: 0644]
cddl/compat/opensolaris/misc/thread_pool_impl.h [new file with mode: 0644]
cddl/lib/libzfs/Makefile