aboutsummaryrefslogtreecommitdiffstats
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-10-15 10:13:07 -0600
committerJens Axboe <axboe@kernel.dk>2020-10-17 09:25:44 -0600
commita8b595b22d31f83b715511f59012f152a269d83b (patch)
treed16fad2aa6470eb99755f5fc02960e6fb86b0730 /fs/io-wq.c
parentio_uring: fix error path cleanup in io_sqe_files_register() (diff)
downloadlinux-dev-a8b595b22d31f83b715511f59012f152a269d83b.tar.xz
linux-dev-a8b595b22d31f83b715511f59012f152a269d83b.zip
io-wq: assign NUMA node locality if appropriate
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>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 0a182f1333e8..149fd2f0927e 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -676,6 +676,7 @@ static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index)
kfree(worker);
return false;
}
+ kthread_bind_mask(worker->task, cpumask_of_node(wqe->node));
raw_spin_lock_irq(&wqe->lock);
hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list);