Evenly distribute the taskq threads across available CPUs

The problem is described in commit aeeb4e0c0a.
However, instead of disabling the binding to CPU altogether we just keep the
last CPU index across calls to taskq_create() and thus achieve even
distribution of the taskq threads across all available CPUs.

The implementation based on assumption that task queues initialization
performed in serial manner.

Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Signed-off-by: Andrey Vesnovaty <andreyv@infinidat.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #336
This commit is contained in:
Andrey Vesnovaty
2013-08-28 05:09:25 +03:00
committed by Brian Behlendorf
parent ae16ed992b
commit 703371d8c7
2 changed files with 21 additions and 0 deletions
+12
View File
@@ -124,3 +124,15 @@ Spin a maximum of N times to acquire lock
.sp
.ne -4
Default value: \fB0\fR.
.RE
.sp
.ne 2
.na
\fBspl_taskq_thread_bind\fR (int)
.ad
.RS 12n
Bind taskq thread to CPU
.sp
Default value: \fB0\fR.
.RE