public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH for-next 4/5] io_uring: optimise ctx flags layout
Date: Mon, 16 Jan 2023 16:49:00 +0000	[thread overview]
Message-ID: <bbe8ca4705704690319d65e45845f9fc9d35f420.1673887636.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

There may be different cost for reeading just one byte or more, so it's
benificial to keep ctx flag bits that we access together in a single
byte. That affected code generation of __io_cq_unlock_post_flush() and
removed one memory load.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 include/linux/io_uring_types.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index cc0cf0705b8f..0efe4d784358 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -196,17 +196,17 @@ struct io_ring_ctx {
 	/* const or read-mostly hot data */
 	struct {
 		unsigned int		flags;
-		unsigned int		compat: 1;
 		unsigned int		drain_next: 1;
 		unsigned int		restricted: 1;
 		unsigned int		off_timeout_used: 1;
 		unsigned int		drain_active: 1;
-		unsigned int		drain_disabled: 1;
 		unsigned int		has_evfd: 1;
-		unsigned int		syscall_iopoll: 1;
 		/* all CQEs should be posted only by the submitter task */
 		unsigned int		task_complete: 1;
+		unsigned int		syscall_iopoll: 1;
 		unsigned int		poll_activated: 1;
+		unsigned int		drain_disabled: 1;
+		unsigned int		compat: 1;
 
 		enum task_work_notify_mode	notify_method;
 		struct io_rings			*rings;
-- 
2.38.1


  parent reply	other threads:[~2023-01-16 17:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 16:48 [PATCH for-next 0/5] random for-next patches Pavel Begunkov
2023-01-16 16:48 ` [PATCH for-next 1/5] io_uring: return back links tw run optimisation Pavel Begunkov
2023-01-16 18:43   ` Jens Axboe
2023-01-16 19:47     ` Pavel Begunkov
2023-01-16 21:04       ` Jens Axboe
2023-01-16 21:14         ` Pavel Begunkov
2023-01-16 21:17           ` Jens Axboe
2023-01-16 21:15         ` Pavel Begunkov
2023-01-16 21:18           ` Jens Axboe
2023-01-16 16:48 ` [PATCH for-next 2/5] io_uring: don't export io_put_task() Pavel Begunkov
2023-01-16 16:48 ` [PATCH for-next 3/5] io_uring: simplify fallback execution Pavel Begunkov
2023-01-16 16:49 ` Pavel Begunkov [this message]
2023-01-16 16:49 ` [PATCH for-next 5/5] io_uring: refactor __io_req_complete_post Pavel Begunkov
2023-01-16 21:09 ` [PATCH for-next 0/5] random for-next patches Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bbe8ca4705704690319d65e45845f9fc9d35f420.1673887636.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox