Skip to content

Commit 1f424e8

Browse files
Hillf Dantonaxboe
authored andcommitted
io-wq: remove unused busy list from io_sqe
Commit e61df66 ("io-wq: ensure free/busy list browsing see all items") added a list for io workers in addition to the free and busy lists, not only making worker walk cleaner, but leaving the busy list unused. Let's remove it. Signed-off-by: Hillf Danton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 3529d8c commit 1f424e8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

fs/io-wq.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ struct io_wqe {
9292
struct io_wqe_acct acct[2];
9393

9494
struct hlist_nulls_head free_list;
95-
struct hlist_nulls_head busy_list;
9695
struct list_head all_list;
9796

9897
struct io_wq *wq;
@@ -327,7 +326,6 @@ static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker,
327326
if (worker->flags & IO_WORKER_F_FREE) {
328327
worker->flags &= ~IO_WORKER_F_FREE;
329328
hlist_nulls_del_init_rcu(&worker->nulls_node);
330-
hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->busy_list);
331329
}
332330

333331
/*
@@ -365,7 +363,6 @@ static bool __io_worker_idle(struct io_wqe *wqe, struct io_worker *worker)
365363
{
366364
if (!(worker->flags & IO_WORKER_F_FREE)) {
367365
worker->flags |= IO_WORKER_F_FREE;
368-
hlist_nulls_del_init_rcu(&worker->nulls_node);
369366
hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list);
370367
}
371368

@@ -798,10 +795,6 @@ void io_wq_cancel_all(struct io_wq *wq)
798795

799796
set_bit(IO_WQ_BIT_CANCEL, &wq->state);
800797

801-
/*
802-
* Browse both lists, as there's a gap between handing work off
803-
* to a worker and the worker putting itself on the busy_list
804-
*/
805798
rcu_read_lock();
806799
for_each_node(node) {
807800
struct io_wqe *wqe = wq->wqes[node];
@@ -1049,7 +1042,6 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
10491042
spin_lock_init(&wqe->lock);
10501043
INIT_WQ_LIST(&wqe->work_list);
10511044
INIT_HLIST_NULLS_HEAD(&wqe->free_list, 0);
1052-
INIT_HLIST_NULLS_HEAD(&wqe->busy_list, 1);
10531045
INIT_LIST_HEAD(&wqe->all_list);
10541046
}
10551047

0 commit comments

Comments
 (0)