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>
Wed, 22 Jun 2022 17:30:59 +0000 (11:30 -0600)
commit160c4ea0047ce9faec8bad8904005e28f8a77640
tree4ce639bf2bf4b2e41ce1c090b39b8ea780dabe09
parent14f4c2e013ce95aaedb79ffdd34b6ced6cf67509
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