diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-03-16 12:53:23 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-16 12:53:23 -0600 |
commit | 521d61fc760aebdbf8938347a40c9538c0a70034 (patch) | |
tree | 430e747cbd201ced715bc5c6c7b43bf8cfb9a6ea /fs/io_uring.c | |
parent | 052ebf1fbb1cab86b145a68d80219c8c57321cbd (diff) |
io_uring: move req->poll_refs into previous struct hole
This serves two purposes:
- We now have the last cacheline mostly unused for generic workloads,
instead of having to pull in the poll refs explicitly for workloads
that rely on poll arming.
- It shrinks the io_kiocb from 232 to 224 bytes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index b17cf54653df..fa4e2cb47e56 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -908,6 +908,7 @@ struct io_kiocb { /* used by request caches, completion batching and iopoll */ struct io_wq_work_node comp_list; atomic_t refs; + atomic_t poll_refs; struct io_kiocb *link; struct io_task_work io_task_work; /* for polled requests, i.e. IORING_OP_POLL_ADD and async armed poll */ @@ -916,12 +917,11 @@ struct io_kiocb { struct async_poll *apoll; /* opcode allocated if it needs to store data for async defer */ void *async_data; - struct io_wq_work work; /* custom credentials, valid IFF REQ_F_CREDS is set */ - const struct cred *creds; /* stores selected buf, valid IFF REQ_F_BUFFER_SELECTED is set */ struct io_buffer *kbuf; - atomic_t poll_refs; + const struct cred *creds; + struct io_wq_work work; }; struct io_tctx_node { |