Skip to content

Commit 0c399a6

Browse files
axboegregkh
authored andcommitted
io-wq: assign NUMA node locality if appropriate
commit a8b595b upstream. There was an assumption that kthread_create_on_node() would properly set NUMA affinities in terms of CPUs allowed, but it doesn't. Make sure we do this when creating an io-wq context on NUMA. Cc: stable@vger.kernel.org Stefan Metzmacher <metze@samba.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ebabf9b commit 0c399a6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/io-wq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index)
654654
kfree(worker);
655655
return false;
656656
}
657+
kthread_bind_mask(worker->task, cpumask_of_node(wqe->node));
657658

658659
raw_spin_lock_irq(&wqe->lock);
659660
hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list);

0 commit comments

Comments
 (0)