public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected], Anuj gupta <[email protected]>,
	Jens Axboe <[email protected]>
Subject: [PATCH v2 1/6] io_uring: introduce io_is_compat()
Date: Mon, 24 Feb 2025 12:42:19 +0000	[thread overview]
Message-ID: <1a87a640265196a67bc38300128e0bfd7839ab1f.1740400452.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

A preparation patch adding a simple helper for gauging the compat state.
It'll help us to optimise and compile out more code in the following
commits.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 io_uring/io_uring.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 650f81dac5d0..daf0e3b740ee 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -147,6 +147,11 @@ static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx)
 #endif
 }
 
+static inline bool io_is_compat(struct io_ring_ctx *ctx)
+{
+	return IS_ENABLED(CONFIG_COMPAT) && unlikely(ctx->compat);
+}
+
 static inline void io_req_task_work_add(struct io_kiocb *req)
 {
 	__io_req_task_work_add(req, 0);
-- 
2.48.1


  reply	other threads:[~2025-02-24 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 12:42 [PATCH v2 0/6] compile out ctx->compat reads Pavel Begunkov
2025-02-24 12:42 ` Pavel Begunkov [this message]
2025-02-24 13:20   ` [PATCH v2 1/6] io_uring: introduce io_is_compat() Anuj gupta
2025-02-24 12:42 ` [PATCH v2 2/6] io_uring/cmd: optimise !CONFIG_COMPAT flags setting Pavel Begunkov
2025-02-24 13:21   ` Anuj gupta
2025-02-24 12:42 ` [PATCH v2 3/6] io_uring/rw: compile out compat param passing Pavel Begunkov
2025-02-24 13:22   ` Anuj gupta
2025-02-24 12:42 ` [PATCH v2 4/6] io_uring/rw: shrink io_iov_compat_buffer_select_prep Pavel Begunkov
2025-02-24 12:42 ` [PATCH v2 5/6] io_uring/waitid: use io_is_compat() Pavel Begunkov
2025-02-24 13:23   ` Anuj gupta
2025-02-24 15:33   ` Caleb Sander Mateos
2025-02-24 16:12     ` Pavel Begunkov
2025-02-24 12:42 ` [PATCH v2 6/6] io_uring/net: " Pavel Begunkov
2025-02-24 13:23   ` Anuj gupta
2025-02-24 14:35 ` [PATCH v2 0/6] compile out ctx->compat reads 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=1a87a640265196a67bc38300128e0bfd7839ab1f.1740400452.git.asml.silence@gmail.com \
    [email protected] \
    [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