K 10 svn:author V 3 mav K 8 svn:date V 27 2013-08-24T22:42:19.461308Z K 7 svn:log V 672 Make taskqueue wrapper used for ZFS more SMP-scalable. For some purposes ZFS requests to create taskqueues with number of threads equal to number of CPUs. As result, on 24-core system we may get situation when interoperation between 5 CAM completion threads and 24 ZFS taskqueue threads protected with single global lock. When number of IOPS reaches hundreds of thousands, that causes significant lock congestion. To workaround that, create several FreeBSD taskqueues to emulate single Solaris taskqueue and distribute tasks between them in round-robin fashion. Using 4 taskqueues of 6 threads for the 24-core system almost completely removed spinning on these locks. END