aboutsummaryrefslogtreecommitdiff
path: root/cddl/compat/opensolaris/misc/thread_pool.c
Commit message (Collapse)AuthorAgeFilesLines
* Use calloc() instead of malloc() + bzero(). This also gets rid of a warningXin LI2014-12-081-4/+2
| | | | | | | | | because bzero is defined by strings.h which is not included in thread_pool.c. MFC after: 2 weeks Notes: svn path=/head/; revision=275595
* Import adapted OpenSolaris' thread pool API implementation.Alexander Motin2014-05-081-0/+430
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. Notes: svn path=/head/; revision=265689