[PATCH 2/3] io_uring: add an io_hash_bucket structure for smaller granularity lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hao Xu <howeyxu@xxxxxxxxxxx>

Add a new io_hash_bucket structure so that each bucket in cancel_hash
has separate spinlock. This is a prep patch for later use.

Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx>
---
 io_uring/cancel.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/io_uring/cancel.h b/io_uring/cancel.h
index 4f35d8696325..b9218310611c 100644
--- a/io_uring/cancel.h
+++ b/io_uring/cancel.h
@@ -4,3 +4,8 @@ int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
 int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags);
 
 int io_try_cancel(struct io_kiocb *req, struct io_cancel_data *cd);
+
+struct io_hash_bucket {
+	spinlock_t		lock;
+	struct hlist_head	list;
+};
-- 
2.25.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux