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
File | Mode | Size |
---|---|---|
unittest-data | ||
Kconfig | -rw-r--r-- | 2.3 KB |
Makefile | -rw-r--r-- | 703 bytes |
address.c | -rw-r--r-- | 27.1 KB |
base.c | -rw-r--r-- | 59.6 KB |
device.c | -rw-r--r-- | 9.8 KB |
dynamic.c | -rw-r--r-- | 22.8 KB |
fdt.c | -rw-r--r-- | 33.9 KB |
fdt_address.c | -rw-r--r-- | 6.2 KB |
irq.c | -rw-r--r-- | 18.6 KB |
kexec.c | -rw-r--r-- | 10.6 KB |
kobj.c | -rw-r--r-- | 3.9 KB |
of_net.c | -rw-r--r-- | 3.8 KB |
of_numa.c | -rw-r--r-- | 3.9 KB |
of_private.h | -rw-r--r-- | 5.9 KB |
of_reserved_mem.c | -rw-r--r-- | 11.3 KB |
overlay.c | -rw-r--r-- | 34.3 KB |
pdt.c | -rw-r--r-- | 4.8 KB |
platform.c | -rw-r--r-- | 20.0 KB |
property.c | -rw-r--r-- | 42.2 KB |
resolver.c | -rw-r--r-- | 8.7 KB |
unittest.c | -rw-r--r-- | 92.5 KB |
Computing file changes ...