]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: limit the number of cancellation buckets
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Jun 2022 09:22:05 +0000 (10:22 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:13 +0000 (18:39 -0600)
commit76a10f7a95847e6115dc53fe837c4fd446aa63e8
tree5653ef6d2eb9e95a9f7b729914d70f1e8b96eaef
parentb0424712609467fb666d8e6f62fbb997662b2eda
io_uring: limit the number of cancellation buckets

Don't allocate to many hash/cancellation buckets, there might be too
many, clamp it to 8 bits, or 256 * 64B = 16KB. We don't usually have too
many requests, and 256 buckets should be enough, especially since we
do hash search only in the cancellation path.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b9620c8072ba61a2d50eba894b89bd93a94a9abd.1655371007.git.asml.silence@gmail.com
Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c