Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io-wq: remove unused busy list from io_sqe

Commit e61df66c69b1 ("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 <hdanton@sina.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Hillf Danton and committed by
Jens Axboe
1f424e8b 3529d8c2

-8
-8
fs/io-wq.c
··· 92 92 struct io_wqe_acct acct[2]; 93 93 94 94 struct hlist_nulls_head free_list; 95 - struct hlist_nulls_head busy_list; 96 95 struct list_head all_list; 97 96 98 97 struct io_wq *wq; ··· 326 327 if (worker->flags & IO_WORKER_F_FREE) { 327 328 worker->flags &= ~IO_WORKER_F_FREE; 328 329 hlist_nulls_del_init_rcu(&worker->nulls_node); 329 - hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->busy_list); 330 330 } 331 331 332 332 /* ··· 363 365 { 364 366 if (!(worker->flags & IO_WORKER_F_FREE)) { 365 367 worker->flags |= IO_WORKER_F_FREE; 366 - hlist_nulls_del_init_rcu(&worker->nulls_node); 367 368 hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list); 368 369 } 369 370 ··· 795 798 796 799 set_bit(IO_WQ_BIT_CANCEL, &wq->state); 797 800 798 - /* 799 - * Browse both lists, as there's a gap between handing work off 800 - * to a worker and the worker putting itself on the busy_list 801 - */ 802 801 rcu_read_lock(); 803 802 for_each_node(node) { 804 803 struct io_wqe *wqe = wq->wqes[node]; ··· 1042 1049 spin_lock_init(&wqe->lock); 1043 1050 INIT_WQ_LIST(&wqe->work_list); 1044 1051 INIT_HLIST_NULLS_HEAD(&wqe->free_list, 0); 1045 - INIT_HLIST_NULLS_HEAD(&wqe->busy_list, 1); 1046 1052 INIT_LIST_HEAD(&wqe->all_list); 1047 1053 } 1048 1054