Skip to content

Commit

Permalink
Remove default taskq thread to CPU bindings
Browse files Browse the repository at this point in the history
When this code was written it appears to have been assumed that
every taskq would have a large number of threads.  In this case
it would make sense to attempt to evenly bind the threads over
all available CPUs.  However, it failed to consider that creating
taskqs with a small number of threads will cause the CPUs with
lower ids become over-subscribed.

For this reason the kthread_bind() call is being removed and
we're leaving the kernel to schedule these threads as it sees fit.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#325
  • Loading branch information
behlendorf committed Jan 7, 2014
1 parent 2f117de commit aeeb4e0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion module/spl/spl-taskq.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ taskq_create(const char *name, int nthreads, pri_t pri,
"%s/%d", name, i);
if (tqt->tqt_thread) {
list_add(&tqt->tqt_thread_list, &tq->tq_thread_list);
kthread_bind(tqt->tqt_thread, i % num_online_cpus());
set_user_nice(tqt->tqt_thread, PRIO_TO_NICE(pri));
wake_up_process(tqt->tqt_thread);
j++;
Expand Down

0 comments on commit aeeb4e0

Please sign in to comment.