Revision b22fa62a35d7f2029d757a518d78041822b7c7c1 authored by Pavel Begunkov on 21 October 2021, 12:20:29 UTC, committed by Jens Axboe on 21 October 2021, 17:19:38 UTC
Another change to the API io-wq worker limitation API added in 5.15,
apply the limit to all prior users that already registered a tctx. It
may be confusing as it's now, in particular the change covers the
following 2 cases:

TASK1                   | TASK2
_________________________________________________
ring = create()         |
                        | limit_iowq_workers()
*not limited*           |

TASK1                   | TASK2
_________________________________________________
ring = create()         |
                        | issue_requests()
limit_iowq_workers()    |
                        | *not limited*

A note on locking, it's safe to traverse ->tctx_list as we hold
->uring_lock, but do that after dropping sqd->lock to avoid possible
problems. It's also safe to access tctx->io_wq there because tasks
kill it only after removing themselves from tctx_list, see
io_uring_cancel_generic() -> io_uring_clean_tctx()

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d6e09ecc3545e4dc56e43c906ee3d71b7ae21bed.1634818641.git.asml.silence@gmail.com
Reviewed-by: Hao Xu <haoxu@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 4ea672a
History
File Mode Size
.gitignore -rw-r--r-- 103 bytes
Kconfig -rw-r--r-- 14.1 KB
Makefile -rw-r--r-- 1016 bytes
adummy.c -rw-r--r-- 4.1 KB
ambassador.c -rw-r--r-- 65.1 KB
ambassador.h -rw-r--r-- 15.0 KB
atmtcp.c -rw-r--r-- 11.5 KB
eni.c -rw-r--r-- 61.0 KB
eni.h -rw-r--r-- 4.6 KB
firestream.c -rw-r--r-- 53.4 KB
firestream.h -rw-r--r-- 13.9 KB
fore200e.c -rw-r--r-- 82.8 KB
fore200e.h -rw-r--r-- 38.1 KB
he.c -rw-r--r-- 76.1 KB
he.h -rw-r--r-- 19.8 KB
horizon.c -rw-r--r-- 81.3 KB
horizon.h -rw-r--r-- 16.0 KB
idt77105.c -rw-r--r-- 11.2 KB
idt77105.h -rw-r--r-- 3.8 KB
idt77252.c -rw-r--r-- 89.1 KB
idt77252.h -rw-r--r-- 33.6 KB
idt77252_tables.h -rw-r--r-- 45.0 KB
iphase.c -rw-r--r-- 107.5 KB
iphase.h -rw-r--r-- 53.3 KB
lanai.c -rw-r--r-- 80.3 KB
midway.h -rw-r--r-- 7.6 KB
nicstar.c -rw-r--r-- 72.9 KB
nicstar.h -rw-r--r-- 22.9 KB
nicstarmac.c -rw-r--r-- 6.0 KB
nicstarmac.copyright -rw-r--r-- 2.7 KB
solos-attrlist.c -rw-r--r-- 2.3 KB
solos-pci.c -rw-r--r-- 38.8 KB
suni.c -rw-r--r-- 9.8 KB
suni.h -rw-r--r-- 9.8 KB
tonga.h -rw-r--r-- 733 bytes
uPD98401.h -rw-r--r-- 11.7 KB
uPD98402.c -rw-r--r-- 6.5 KB
uPD98402.h -rw-r--r-- 4.5 KB
zatm.c -rw-r--r-- 43.2 KB
zatm.h -rw-r--r-- 3.6 KB
zeprom.h -rw-r--r-- 984 bytes

back to top