Re: [PATCH 1/3] io_uring: add hash_index and its logic to track req in cancel_hash

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

 



On 6/6/22 19:59, Pavel Begunkov wrote:
On 6/6/22 07:57, Hao Xu wrote:
From: Hao Xu <howeyxu@xxxxxxxxxxx>

Add a new member hash_index in struct io_kiocb to track the req index
in cancel_hash array. This is needed in later patches.

Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx>
---
  io_uring/io_uring_types.h | 1 +
  io_uring/poll.c           | 4 +++-
  2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/io_uring/io_uring_types.h b/io_uring/io_uring_types.h
index 7c22cf35a7e2..2041ee83467d 100644
--- a/io_uring/io_uring_types.h
+++ b/io_uring/io_uring_types.h
@@ -474,6 +474,7 @@ struct io_kiocb {
              u64        extra2;
          };
      };
+    unsigned int            hash_index;

Didn't take a closer look, but can we make rid of it?
E.g. computing it again when ejecting a request from
the hash? or keep it in struct io_poll?

Good point, I prefer moving it to io_poll to computing it again since
this patchset is to try to make it faster.




[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