summaryrefslogtreecommitdiff
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-16 10:06:21 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-21 17:25:22 -0700
commit1cbd9c2bcf02a3be91e14c7206d4b6c0346540ed (patch)
tree9af7b1a79f6d1c8edc3d9bb32465a23604743ac1 /fs/io-wq.c
parent7c25c0d16ef3c37e49c593ac92f69fa3884d4bb9 (diff)
io-wq: don't create any IO workers upfront
When the manager thread starts up, it creates a worker per node for the given context. Just let these get created dynamically, like we do for adding further workers. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 800b299f9772..e9e218274c76 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -759,18 +759,7 @@ static int io_wq_manager(void *data)
struct io_wq *wq = data;
int node;
- /* create fixed workers */
refcount_set(&wq->refs, 1);
- for_each_node(node) {
- if (!node_online(node))
- continue;
- if (create_io_worker(wq, wq->wqes[node], IO_WQ_ACCT_BOUND))
- continue;
- set_bit(IO_WQ_BIT_ERROR, &wq->state);
- set_bit(IO_WQ_BIT_EXIT, &wq->state);
- goto out;
- }
-
complete(&wq->done);
while (!kthread_should_stop()) {
@@ -796,7 +785,6 @@ static int io_wq_manager(void *data)
schedule_timeout(HZ);
}
-out:
if (refcount_dec_and_test(&wq->refs)) {
complete(&wq->done);
return 0;