io_uring: switch cancel_hash to use per entry spinlock
authorHao Xu <howeyxu@tencent.com>
Thu, 16 Jun 2022 09:22:02 +0000 (10:22 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:13 +0000 (18:39 -0600)
commit38513c464d3d45b4088c82f6e42d9cdbc5ee57e6
treedefce3565cffbddce9dda6a8466298939015584c
parent3654ab0c51a91036d15dd2fd9c2809317edf2228
io_uring: switch cancel_hash to use per entry spinlock

Add a new io_hash_bucket structure so that each bucket in cancel_hash
has separate spinlock. Use per entry lock for cancel_hash, this removes
some completion lock invocation and remove contension between different
cancel_hash entries.

Signed-off-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/05d1e135b0c8bce9d1441e6346776589e5783e26.1655371007.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/cancel.c
io_uring/cancel.h
io_uring/fdinfo.c
io_uring/io_uring.c
io_uring/io_uring_types.h
io_uring/poll.c